Saltstack Official Salt Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

map.jinja 1.8KB

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