New version of salt-formula from Saltstack
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

154 linhas
3.2KB

  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. pkgs:
  47. - salt-syndic
  48. RedHat:
  49. pkgs:
  50. - salt-syndic
  51. {%- endload %}
  52. {%- set syndic = salt['grains.filter_by'](syndic_defaults, merge=salt['pillar.get']('salt:syndic')) %}
  53. {%- load_yaml as minion_common %}
  54. default:
  55. graph_pkgs:
  56. - graphviz
  57. graph_states_pkgs:
  58. - python-pydot
  59. - python-yaml
  60. graph_states: False
  61. log:
  62. level: info
  63. service: salt-minion
  64. {%- if pillar.salt.get('minion', {}).get('source', {}).get('engine', 'pkg') == 'pkg' %}
  65. install_state: "pkg: salt_minion_packages"
  66. source:
  67. engine: pkg
  68. {%- elif pillar.salt.minion.source.engine == 'pip' %}
  69. install_state: "pip: salt_minion_packages"
  70. {%- endif %}
  71. {%- if pillar.salt.get('minion', {}).get('source', {}).version is defined %}
  72. version: {{ pillar.salt.minion.source.version }}
  73. {%- endif %}
  74. {%- endload %}
  75. {%- load_yaml as minion_specific %}
  76. Arch:
  77. pkgs:
  78. - salt-zmq
  79. Debian:
  80. pkgs:
  81. - salt-minion
  82. - python-m2crypto
  83. - python-psutil
  84. Gentoo:
  85. pkgs:
  86. - app-admin/salt
  87. MacOS:
  88. pkgs:
  89. - saltstack
  90. RedHat:
  91. pkgs:
  92. - salt-minion
  93. - python-m2ext
  94. - python-psutil
  95. {%- endload %}
  96. {%- if pillar.salt.minion is defined %}
  97. {%- set raw_minion = salt['grains.filter_by'](minion_specific, merge=salt['pillar.get']('salt:minion')) %}
  98. {%- set minion = salt['grains.filter_by'](minion_common, merge=raw_minion) %}
  99. {%- endif %}
  100. {%- load_yaml as api_common %}
  101. default:
  102. pkgs:
  103. - salt-api
  104. service: salt-api
  105. {%- endload %}
  106. {%- set api = salt['grains.filter_by'](api_common, merge=salt['pillar.get']('salt:api')) %}
  107. {%- load_yaml as control_common %}
  108. default:
  109. cloud_pips:
  110. - apache-libcloud
  111. - netaddr
  112. cloud_pkgs:
  113. - python-netaddr
  114. - python-libcloud
  115. virt_pips:
  116. - libvirt-python
  117. maas_pkgs:
  118. - python-maas-client
  119. cluster: {}
  120. {%- endload %}
  121. {%- load_yaml as control_specific %}
  122. Debian:
  123. virt_pkgs:
  124. - libvirt-dev
  125. - pkg-config
  126. - libguestfs-tools
  127. RedHat:
  128. virt_pkgs:
  129. - libvirt-dev
  130. - pkg-config
  131. {%- endload %}
  132. {%- if pillar.salt.control is defined %}
  133. {%- set raw_control = salt['grains.filter_by'](control_specific, merge=salt['pillar.get']('salt:control')) %}
  134. {%- set control = salt['grains.filter_by'](control_common, merge=raw_control) %}
  135. {%- endif %}