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_master.sh 639B

1234567891011
  1. #!/bin/sh
  2. {%- from "salt/map.jinja" import master with context %}
  3. {%- if master.initial_data is defined %}
  4. mkdir -p /etc/salt/pki.bak
  5. mv /etc/salt/pki/* /etc/salt/pki.bak
  6. scp -r backupninja@{{ master.initial_data.source }}:/srv/backupninja/{{ master.initial_data.host }}/etc/salt/pki/pki.0/* /etc/salt/pki
  7. {%- if master.pillar.engine == 'reclass' or (master.pillar.engine == 'composite' and master.pillar.reclass is defined) %}
  8. scp -r backupninja@{{ master.initial_data.source }}:/srv/backupninja/{{ master.initial_data.host }}/srv/salt/reclass/nodes/_generated/_generated.0/* /srv/salt/reclass/nodes/_generated
  9. {%- endif %}
  10. {%- endif %}