-
-
Save anonymous/7b946a5b98e560436f7e to your computer and use it in GitHub Desktop.
/srv/reactor/auth-pending.sls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ | |
"/srv/reactor/auth-pending.sls | |
{# rs_ server faild to authenticate -- remove accepted key #} | |
{% if not data['result'] and data['id'].startswith('ink') %} | |
minion_remove: | |
wheel.key.delete: | |
- match: {{ data['id'] }} | |
minion_rejoin: | |
local.cmd.run: | |
- tgt: salt-master.domain.tld | |
- arg: | |
- ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "{{ data['id'] }}" 'sleep 10 && /etc/init.d/salt-minion restart' | |
{% endif %} | |
{# Ink server is sending new key -- accept this key #} | |
{% if 'act' in data and data['act'] == 'pend' and data['id'].startswith('rs_') %} | |
minion_add: | |
wheel.key.accept: | |
- match: {{ data['id'] }} | |
{% endif %} | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment