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.

30 line
734B

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. linux_system_doc_grains_dir:
  4. file.directory:
  5. - name: /etc/salt/grains.d
  6. - mode: 700
  7. - makedirs: true
  8. - user: root
  9. linux_system_doc_grain:
  10. file.managed:
  11. - name: /etc/salt/grains.d/sphinx
  12. - source: salt://linux/files/sphinx.grain
  13. - template: jinja
  14. - mode: 600
  15. - require:
  16. - file: linux_system_doc_grains_dir
  17. linux_system_doc_validity_check:
  18. pkg.installed:
  19. - name: python-yaml
  20. cmd.wait:
  21. - name: python -c "import yaml; stream = file('/etc/salt/grains.d/sphinx', 'r'); yaml.load(stream); stream.close()"
  22. - require:
  23. - pkg: linux_system_doc_validity_check
  24. - watch:
  25. - file: linux_system_doc_grain
  26. {%- endif %}