1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env python3 import os roles = [] excluded = ['common-suse', 'minion'] def get(): for file in os.listdir('salt/role'): role = os.path.splitext(file)[0] if not role in excluded: roles.append(role) return roles