New version of salt-formula from Saltstack
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1234567891011121314151617181920212223242526272829303132
  1. {%- from "salt/map.jinja" import master with context %}
  2. {%- if master.enabled %}
  3. {%- for environment_name, environment in master.get('environment', {}).iteritems() %}
  4. {%- if master.base_environment == environment_name %}
  5. {%- set formula_dict = {} %}
  6. {%- for formula_name, formula in formula_dict.iteritems() %}
  7. {%- if salt['file.file_exists']('salt://'+formula_name+'/meta/salt.yml') %}
  8. {%- set grains_fragment_file = formula_name+'/meta/salt.yml' %}
  9. {%- macro load_grains_file() %}{% include grains_fragment_file %}{% endmacro %}
  10. {%- set grains_yaml = load_grains_file()|load_yaml %}
  11. {% _dummy = formula_dict.update{formula_name: grains_yaml.orchestrate }}
  12. {%- else %}
  13. {%- endif %}
  14. {%- endfor %}
  15. /srv/salt/env/{{ environment_name}}/orchestrate.sls:
  16. file.managed:
  17. - source: salt://salt/files/orchestrate.sls
  18. - user: root
  19. - template: jinja
  20. - defaults:
  21. formula_dict: {{ formula_dict|yaml }}
  22. {%- endif %}
  23. {%- endfor %}
  24. {%- endif %}