New version of salt-formula from Saltstack
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.

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 %}