Skip to content

Instantly share code, notes, and snippets.

@3issamben
Forked from eofs/master
Created July 31, 2018 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3issamben/dfd4e9fa0b205cb26cbaf55bb7838f85 to your computer and use it in GitHub Desktop.
Save 3issamben/dfd4e9fa0b205cb26cbaf55bb7838f85 to your computer and use it in GitHub Desktop.
Remove keys of disconnected Saltstack minions
# 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
{% 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