Saltstack Official Linux Formula
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.

salt.yml 1.1KB

1234567891011121314151617181920212223242526272829303132
  1. {%- from "linux/map.jinja" import system,network with context -%}
  2. orchestrate:
  3. system:
  4. priority: 30
  5. network:
  6. priority: 40
  7. storage:
  8. priority: 50
  9. grain:
  10. sphinx:
  11. {%- set service_grains = {'sphinx': {'doc': {}}} %}
  12. {%- for service_name, service in pillar.items() %}
  13. {%- if service.get('_support', {}).get('sphinx', {}).get('enabled', False) %}
  14. {%- set grains_fragment_file = service_name+'/meta/sphinx.yml' %}
  15. {%- macro load_grains_file() %}{% include grains_fragment_file ignore missing %}{% endmacro %}
  16. {%- set grains = load_grains_file()|load_yaml %}
  17. {%- if grains %}
  18. {%- set grains_yaml = load_grains_file()|load_yaml %}
  19. {%- do service_grains.sphinx.doc.update({ service_name: grains_yaml.doc }) %}
  20. {%- endif %}
  21. {%- endif %}
  22. {%- endfor %}
  23. {{ service_grains|yaml(False)|indent(4) }}
  24. {%- set dns_records = [] %}
  25. {%- for host_name, host in network.host.items() %}
  26. {%- if host.get('grain', False) %}
  27. {%- do host.pop('grain') %}
  28. {%- do dns_records.append(host) %}
  29. {%- endif %}
  30. {%- endfor %}
  31. dns_records:
  32. dns_records: {{ dns_records|yaml }}