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.

109 satır
3.2KB

  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. }, grain="os_family", merge=salt['pillar.get']('salt:lookup'))
  96. %}
  97. {## Merge the flavor_map to the default settings ##}
  98. {% do default_settings.salt.update(os_family_map) %}
  99. {## Merge in salt:lookup pillar ##}
  100. {% set salt_settings = salt['pillar.get'](
  101. 'salt',
  102. default=default_settings.salt,
  103. merge=True)
  104. %}