New version of salt-formula from Saltstack
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

map.jinja 3.0KB

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