salt/bin/roles.py

14 lines
258 B
Python
Raw Normal View History

#!/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