diff options
Diffstat (limited to 'bin/roles.py')
-rwxr-xr-x | bin/roles.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/roles.py b/bin/roles.py new file mode 100755 index 0000000..1777f8c --- /dev/null +++ b/bin/roles.py @@ -0,0 +1,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 |