New version of salt-formula from Saltstack
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

restore.sls 667B

123456789101112131415161718192021222324252627282930313233
  1. {%- from "salt/map.jinja" import minion with context %}
  2. {%- if minion.enabled %}
  3. {%- if minion.ca is defined %}
  4. {%- if minion.initial_data is defined %}
  5. /srv/salt/restore_minion.sh:
  6. file.managed:
  7. - source: salt://salt/files/restore_minion.sh
  8. - mode: 700
  9. - template: jinja
  10. salt_minion_restore_state:
  11. cmd.run:
  12. - name: /srv/salt/restore_minion.sh
  13. - unless: "test -e /srv/salt/minion-restored"
  14. - cwd: /root
  15. - require:
  16. - file: /srv/salt/restore_minion.sh
  17. salt_minion_restore_completed:
  18. file.managed:
  19. - name: /srv/salt/minion-restored
  20. - source: {}
  21. - require:
  22. - cmd: salt_minion_restore_state
  23. {%- endif %}
  24. {%- endif %}
  25. {%- endif %}