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_minion.sh 381B

1234567891011
  1. #!/bin/sh
  2. {%- from "salt/map.jinja" import minion with context %}
  3. {%- if minion.ca is defined %}
  4. {%- if minion.initial_data is defined %}
  5. mkdir -p /etc/pki/pki_ca.bak
  6. mkdir -p /etc/pki/ca
  7. mv /etc/pki/ca/* /etc/pki/pki_ca.bak
  8. scp -r backupninja@{{ minion.initial_data.source }}:/srv/backupninja/{{ minion.initial_data.host }}/etc/pki/ca/ca.0/* /etc/pki/ca
  9. {%- endif %}
  10. {%- endif %}