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.

75 lines
1.9KB

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