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.

30 line
621B

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