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 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 osrelease = salt['grains.get']('osrelease') %}
  10. {% set os_family_map = salt['grains.filter_by']({
  11. 'Debian': {
  12. 'pkgrepo': 'deb http://repo.saltstack.com/apt/' +
  13. salt['grains.get']('os')|lower + '/' + salt['grains.get']('osmajorrelease', osrelease) + '/amd64/latest ' + salt['grains.get']('oscodename') + ' main',
  14. 'key_url': 'https://repo.saltstack.com/apt/' + salt['grains.get']('os')|lower + '/' + salt['grains.get']('osmajorrelease', osrelease) + '/amd64/latest/SALTSTACK-GPG-KEY.pub',
  15. 'libgit2': 'libgit2-22',
  16. 'gitfs': {
  17. 'pygit2': {
  18. 'install_from_source': True,
  19. 'version': '0.22.1',
  20. 'git': {
  21. 'require_state': False,
  22. 'install_from_package': 'git',
  23. },
  24. 'libgit2': {
  25. 'install_from_source': False,
  26. },
  27. },
  28. },
  29. },
  30. 'RedHat': {
  31. 'pygit2': 'python-pygit2',
  32. 'python_git': 'GitPython',
  33. 'gitfs': {
  34. 'pygit2': {
  35. 'install_from_source': False,
  36. 'git': {
  37. 'require_state': False,
  38. 'install_from_package': 'git',
  39. },
  40. },
  41. },
  42. 'master': {
  43. 'gitfs_provider': 'pygit2'
  44. },
  45. 'repotype': 'epel',
  46. },
  47. 'Suse': {},
  48. 'Gentoo': {
  49. 'salt_master': 'app-admin/salt',
  50. 'salt_minion': 'app-admin/salt',
  51. 'salt_syndic': 'app-admin/salt',
  52. 'salt_api': 'app-admin/salt',
  53. 'salt_cloud': 'app-admin/salt',
  54. },
  55. 'Arch': {
  56. 'salt_master': 'salt-zmq',
  57. 'salt_minion': 'salt-zmq',
  58. 'salt_syndic': 'salt-zmq',
  59. 'salt_cloud': 'salt-zmq',
  60. 'salt_api': 'salt-zmq',
  61. 'salt_ssh': 'salt-zmq',
  62. },
  63. 'FreeBSD': {
  64. 'salt_master': 'py27-salt',
  65. 'salt_minion': 'py27-salt',
  66. 'salt_syndic': 'py27-salt',
  67. 'salt_cloud': 'py27-salt',
  68. 'salt_api': 'py27-salt',
  69. 'salt_ssh': 'py27-salt',
  70. 'python_git': 'py27-GitPython',
  71. 'pygit2': 'py27-pygit2',
  72. 'config_path': '/usr/local/etc/salt',
  73. 'minion_service': 'salt_minion',
  74. 'master_service': 'salt_master',
  75. 'api_service': 'salt_api',
  76. 'syndic_service': 'salt_syndic',
  77. },
  78. 'OpenBSD': {
  79. 'salt_master': 'salt',
  80. 'salt_minion': 'salt',
  81. 'salt_syndic': 'salt',
  82. 'salt_cloud': 'salt',
  83. 'salt_api': 'salt',
  84. 'salt_ssh': 'salt',
  85. 'config_path': '/etc/salt',
  86. 'minion_service': 'salt_minion',
  87. 'master_service': 'salt_master',
  88. 'python_git': 'py-GitPython',
  89. },
  90. 'Windows': {
  91. 'salt_minion': 'saltstack.minion',
  92. 'config_path': 'C:\salt\conf',
  93. 'minion_service': 'salt-minion',
  94. },
  95. }, merge=salt['grains.filter_by']({
  96. 'Ubuntu': {
  97. 'pkgrepo': 'deb http://repo.saltstack.com/apt/' +
  98. salt['grains.get']('os')|lower + '/' + osrelease + '/amd64/latest ' + salt['grains.get']('oscodename') + ' main',
  99. 'key_url': 'https://repo.saltstack.com/apt/' + salt['grains.get']('os')|lower + '/' + osrelease + '/amd64/latest/SALTSTACK-GPG-KEY.pub',
  100. },
  101. 'Raspbian': {
  102. 'pkgrepo': 'deb http://repo.saltstack.com/apt/' +
  103. salt['grains.get']('os_family')|lower + '/' + salt['grains.get']('osmajorrelease', osrelease) + '/armhf/latest ' + salt['grains.get']('oscodename') + ' main',
  104. 'key_url': 'https://repo.saltstack.com/apt/' + salt['grains.get']('os_family')|lower + '/' + salt['grains.get']('osmajorrelease', osrelease) + '/armhf/latest/SALTSTACK-GPG-KEY.pub',
  105. },
  106. }, grain='os', merge=salt['pillar.get']('salt:lookup')))
  107. %}
  108. {## Merge the flavor_map to the default settings ##}
  109. {% do default_settings.salt.update(os_family_map) %}
  110. {## Merge in salt:lookup pillar ##}
  111. {% set salt_settings = salt['pillar.get'](
  112. 'salt',
  113. default=default_settings.salt,
  114. merge=True)
  115. %}