Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python
- from yaml import load
- from pprint import pprint
- from os.path import exists
- from os import remove
- # /var/cache/salt/master/minions/CLIENT/data.p
- with open('/etc/salt/roster', 'r') as f:
- roster = load(f)
- for key in roster.keys():
- path = '/var/cache/salt/master/minions/%s/data.p' % key
- if exists(path):
- remove(path)
- else:
- print '%s does not have a data.p file in %s' % (key, path)
- ## END OF LINE ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement