Last active
April 10, 2019 14:02
-
-
Save eofs/0219728e6f89e6e7b860 to your computer and use it in GitHub Desktop.
Remove keys of disconnected Saltstack minions
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
# Enable "presence" events | |
# - http://docs.saltstack.com/en/latest/ref/configuration/master.html#presence-events | |
# - http://docs.saltstack.com/en/latest/topics/event/master_events.html#presence-events | |
presence_events: True | |
reactor: | |
# Note: This tag has a typo in it (version 2014.1.5), subject to change! | |
- 'salt/presense/change': | |
- /srv/reactor/presence.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
{% for minion_id in data['lost'] %} | |
remove_unused_keys: | |
wheel.key.delete: | |
- match: {{ minion_id }} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to those that find this using google, here's an updated version without the typo from version 2014.1.5
the following is confirmed working in 2016.11.3: