Saltstack Official Salt Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. 'salt_ssh': 'py27-salt',
  50. 'python_git': 'py27-GitPython',
  51. 'config_path': '/usr/local/etc/salt',
  52. 'minion_service': 'salt_minion',
  53. 'master_service': 'salt_master',
  54. 'api_service': 'salt_api',
  55. 'syndic_service': 'salt_syndic'
  56. },
  57. }
  58. , grain="os_family"
  59. , merge=salt['pillar.get']('salt:lookup'))
  60. %}
  61. {## Merge the flavor_map to the default settings ##}
  62. {% do default_settings.salt.update(os_family_map) %}
  63. {## Merge in salt:lookup pillar ##}
  64. {% set salt_settings = salt['pillar.get'](
  65. 'salt',
  66. default=default_settings.salt,
  67. merge=True
  68. )
  69. %}