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.

16 line
500B

  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 }}:{{ minion.initial_data.get('home_dir', '/srv/backupninja') }}/{{ minion.initial_data.host }}/etc/pki/ca/ca.0/* /etc/pki/ca
  9. RC=$?
  10. if [ $RC -gt 0 ]; then
  11. mv /etc/pki/pki_ca.bak/* /etc/pki/ca
  12. fi
  13. {%- endif %}
  14. {%- endif %}