diff options
author | Georg Pfuetzenreuter | 2023-01-15 09:18:15 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-15 09:18:15 +0100 |
commit | f1a4b0514c148d9b5477f5c2b11938445e4438b1 (patch) | |
tree | 003745428e583f6d3287f0259040dc1358503505 /bin/roles.py | |
download | salt-f1a4b0514c148d9b5477f5c2b11938445e4438b1.tar.gz salt-f1a4b0514c148d9b5477f5c2b11938445e4438b1.tar.bz2 salt-f1a4b0514c148d9b5477f5c2b11938445e4438b1.zip |
Init
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
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 |