Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.8KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {## Start with defaults from defaults.yaml ##}
  4. {% import_yaml "salt/defaults.yaml" as default_settings %}
  5. {##
  6. Setup variable using grains['os_family'] based logic, only add key:values here
  7. that differ from whats in defaults.yaml
  8. ##}
  9. {% set os_family_map = salt['grains.filter_by']({
  10. 'Debian': {},
  11. 'Ubuntu': {},
  12. 'CentOS': {},
  13. 'Amazon': {},
  14. 'Fedora': {},
  15. 'RedHat': {
  16. 'pygit2': 'python-pygit2',
  17. 'gitfs': {
  18. 'pygit2': {
  19. 'install_from_source': False
  20. },
  21. },
  22. 'master': {
  23. 'gitfs_provider': 'pygit2'
  24. },
  25. 'repotype': 'epel'
  26. },
  27. 'Suse': {},
  28. 'Gentoo': {
  29. 'salt_master': 'app-admin/salt',
  30. 'salt_minion': 'app-admin/salt',
  31. 'salt_syndic': 'app-admin/salt',
  32. 'salt_api': 'app-admin/salt',
  33. 'salt_cloud': 'app-admin/salt'
  34. },
  35. 'Arch': {
  36. 'salt_master': 'salt-zmq',
  37. 'salt_minion': 'salt-zmq',
  38. 'salt_syndic': 'salt-zmq',
  39. 'salt_cloud': 'salt-zmq',
  40. 'salt_api': 'salt-zmq',
  41. 'salt_ssh': 'salt-zmq'
  42. },
  43. 'FreeBSD': {
  44. 'salt_master': 'py27-salt',
  45. 'salt_minion': 'py27-salt',
  46. 'salt_syndic': 'py27-salt',
  47. 'salt_cloud': 'py27-salt',
  48. 'salt_api': 'py27-salt',
  49. 'python_git': 'py27-GitPython',
  50. 'config_path': '/usr/local/etc/salt',
  51. 'minion_service': 'salt_minion',
  52. 'master_service': 'salt_master',
  53. 'api_service': 'salt_api',
  54. 'syndic_service': 'salt_syndic'
  55. },
  56. }
  57. , grain="os_family"
  58. , merge=salt['pillar.get']('salt:lookup'))
  59. %}
  60. {## Merge the flavor_map to the default settings ##}
  61. {% do default_settings.salt.update(os_family_map) %}
  62. {## Merge in salt:lookup pillar ##}
  63. {% set salt_settings = salt['pillar.get'](
  64. 'salt',
  65. default=default_settings.salt,
  66. merge=True
  67. )
  68. %}