Saltstack Official Salt Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

map.jinja 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. 'pkgrepo': 'deb http://debian.saltstack.com/debian ' + salt['grains.get']('oscodename') + '-saltstack main',
  12. 'key_url': 'salt://salt/pkgrepo/debian/saltstack.gpg',
  13. 'libgit2': 'libgit2-22',
  14. 'gitfs': {
  15. 'pygit2': {
  16. 'install_from_source': True,
  17. 'version': '0.22.1',
  18. 'git': {
  19. 'require_state': False,
  20. 'install_from_package': 'git',
  21. },
  22. 'libgit2': {
  23. 'install_from_source': False,
  24. },
  25. },
  26. },
  27. },
  28. 'RedHat': {
  29. 'pygit2': 'python-pygit2',
  30. 'gitfs': {
  31. 'pygit2': {
  32. 'install_from_source': False,
  33. 'git': {
  34. 'require_state': False,
  35. 'install_from_package': 'git',
  36. },
  37. },
  38. },
  39. 'master': {
  40. 'gitfs_provider': 'pygit2'
  41. },
  42. 'repotype': 'epel',
  43. },
  44. 'Suse': {},
  45. 'Gentoo': {
  46. 'salt_master': 'app-admin/salt',
  47. 'salt_minion': 'app-admin/salt',
  48. 'salt_syndic': 'app-admin/salt',
  49. 'salt_api': 'app-admin/salt',
  50. 'salt_cloud': 'app-admin/salt',
  51. },
  52. 'Arch': {
  53. 'salt_master': 'salt-zmq',
  54. 'salt_minion': 'salt-zmq',
  55. 'salt_syndic': 'salt-zmq',
  56. 'salt_cloud': 'salt-zmq',
  57. 'salt_api': 'salt-zmq',
  58. 'salt_ssh': 'salt-zmq',
  59. },
  60. 'FreeBSD': {
  61. 'salt_master': 'py27-salt',
  62. 'salt_minion': 'py27-salt',
  63. 'salt_syndic': 'py27-salt',
  64. 'salt_cloud': 'py27-salt',
  65. 'salt_api': 'py27-salt',
  66. 'salt_ssh': 'py27-salt',
  67. 'python_git': 'py27-GitPython',
  68. 'pygit2': 'py27-pygit2',
  69. 'config_path': '/usr/local/etc/salt',
  70. 'minion_service': 'salt_minion',
  71. 'master_service': 'salt_master',
  72. 'api_service': 'salt_api',
  73. 'syndic_service': 'salt_syndic',
  74. },
  75. 'Windows': {
  76. 'salt_minion': 'saltstack.minion',
  77. 'config_path': 'C:\salt\conf',
  78. 'minion_service': 'salt-minion',
  79. },
  80. }, grain="os_family", merge=salt['pillar.get']('salt:lookup'))
  81. %}
  82. {## Merge the flavor_map to the default settings ##}
  83. {% do default_settings.salt.update(os_family_map) %}
  84. {## Merge in salt:lookup pillar ##}
  85. {% set salt_settings = salt['pillar.get'](
  86. 'salt',
  87. default=default_settings.salt,
  88. merge=True)
  89. %}