New version of salt-formula from Saltstack
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.

map.jinja 3.7KB

9 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. {%- load_yaml as master_common %}
  2. default:
  3. service: salt-master
  4. {%- if pillar.salt.get('master', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  5. install_state: "pkg: salt_master_packages"
  6. source:
  7. engine: pkg
  8. {%- elif pillar.salt.master.source.engine == 'pip' %}
  9. install_state: "pip: salt_master_packages"
  10. {%- endif %}
  11. {%- if pillar.salt.get('master', {}).get('source', {}).version is defined %}
  12. version: {{ pillar.salt.master.source.version }}
  13. {%- endif %}
  14. accept_policy: preseed
  15. bind: {}
  16. formula: {}
  17. base_environment: dev
  18. dir:
  19. files: /srv/salt/env
  20. pillar:
  21. engine: salt
  22. {%- endload %}
  23. {%- load_yaml as master_specific %}
  24. Arch:
  25. pkgs:
  26. - salt-zmq
  27. Debian:
  28. pkgs:
  29. - salt-master
  30. Gentoo:
  31. pkgs:
  32. - app-admin/salt
  33. MacOS:
  34. pkgs:
  35. - saltstack
  36. RedHat:
  37. pkgs:
  38. - salt-master
  39. {%- endload %}
  40. {%- if pillar.salt.master is defined %}
  41. {%- set raw_master = salt['grains.filter_by'](master_specific, merge=salt['pillar.get']('salt:master')) %}
  42. {%- set master = salt['grains.filter_by'](master_common, merge=raw_master) %}
  43. {%- endif %}
  44. {%- load_yaml as syndic_defaults %}
  45. Debian:
  46. service: salt-syndic
  47. pkgs:
  48. - salt-syndic
  49. RedHat:
  50. service: salt-syndic
  51. pkgs:
  52. - salt-syndic
  53. {%- endload %}
  54. {%- set syndic = salt['grains.filter_by'](syndic_defaults, merge=salt['pillar.get']('salt:syndic')) %}
  55. {%- load_yaml as minion_common %}
  56. default:
  57. graph_pkgs:
  58. - graphviz
  59. graph_states_pkgs:
  60. - python-pydot
  61. - python-yaml
  62. graph_states: False
  63. log:
  64. level: info
  65. service: salt-minion
  66. {%- if pillar.salt.get('minion', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  67. install_state: "pkg: salt_minion_packages"
  68. source:
  69. engine: pkg
  70. {%- elif pillar.salt.minion.source.engine == 'pip' %}
  71. install_state: "pip: salt_minion_packages"
  72. {%- endif %}
  73. {%- if pillar.salt.get('minion', {}).get('source', {}).version is defined %}
  74. version: {{ pillar.salt.minion.source.version }}
  75. {%- endif %}
  76. {%- endload %}
  77. {%- load_yaml as minion_specific %}
  78. Arch:
  79. pkgs:
  80. - salt-zmq
  81. Debian:
  82. pkgs:
  83. - salt-minion
  84. - python-m2crypto
  85. - python-psutil
  86. - python-yaml
  87. Gentoo:
  88. pkgs:
  89. - app-admin/salt
  90. MacOS:
  91. pkgs:
  92. - saltstack
  93. RedHat:
  94. pkgs:
  95. - salt-minion
  96. - m2crypto
  97. - psutils
  98. - PyYAML
  99. {%- endload %}
  100. {%- if pillar.salt.minion is defined %}
  101. {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
  102. {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
  103. {%- if pillar.salt.minion.proxy is defined %}
  104. {% set proxy = salt['grains.filter_by']({
  105. 'Debian': {
  106. 'napalm_pkgs': ['python-pip', 'libxml2-dev', 'libxslt1-dev', 'zlib1g-dev'],
  107. 'napalm_pip_pkgs': ['napalm', 'oauth']
  108. },
  109. 'RedHat': {
  110. 'napalm_pkgs': ['libxml2-dev', 'libxslt1-dev', 'zlib1g-dev']
  111. },
  112. }, merge=pillar.salt.minion.get('proxy', {})) %}
  113. {%- endif %}
  114. {%- endif %}
  115. {%- load_yaml as api_common %}
  116. default:
  117. pkgs:
  118. - salt-api
  119. service: salt-api
  120. {%- endload %}
  121. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  122. {%- load_yaml as control_common %}
  123. default:
  124. cloud_pips:
  125. - apache-libcloud
  126. - netaddr
  127. cloud_pkgs:
  128. - python-netaddr
  129. - python-libcloud
  130. virt_pips:
  131. - libvirt-python
  132. maas_pkgs:
  133. - python-maas-client
  134. cluster: {}
  135. {%- endload %}
  136. {%- load_yaml as control_specific %}
  137. Debian:
  138. virt_pkgs:
  139. - libvirt-dev
  140. - pkg-config
  141. {% if grains.oscodename == 'trusty' %}
  142. - libguestfs-tools
  143. {% endif %}
  144. RedHat:
  145. virt_pkgs:
  146. - libvirt-dev
  147. - pkg-config
  148. {%- endload %}
  149. {%- if pillar.salt.control is defined %}
  150. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  151. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  152. {%- endif %}