Compare commits
3 Commits
9aa39f97e4
...
b435117808
Author | SHA1 | Date | |
---|---|---|---|
b435117808 | |||
e93fd5c0a8 | |||
18e26723dd |
@ -9,10 +9,10 @@ import yaml
|
||||
|
||||
roles = roles.get()
|
||||
grainsfile = '/etc/salt/grains'
|
||||
idfile = os.path.join('pillar/id/', socket.gethostname(), '.sls')
|
||||
idfile = os.path.join('pillar/id/', socket.gethostname() + '.sls')
|
||||
configfile = '/etc/salt/minion.d/local.conf'
|
||||
mypwd = os.getcwd()
|
||||
formulasfile = os.path.join('..', 'formulas.yaml')
|
||||
formulasfile = 'formulas.yaml'
|
||||
|
||||
grainsdata = {'roles': roles}
|
||||
|
||||
@ -23,14 +23,14 @@ with open(idfile, mode='w') as idfh:
|
||||
idfh.write('# empty')
|
||||
|
||||
with open(formulasfile, mode='r') as formulasfh:
|
||||
formulas = yaml.load(formulasfh, Loader=FullLoader)
|
||||
formulas = yaml.load(formulasfh, Loader=yaml.FullLoader)
|
||||
|
||||
with open(configfile, mode='w') as configfh:
|
||||
configfh.write(''''# written by prepare_minion.py
|
||||
configfh.write('''# written by prepare_minion.py
|
||||
file_roots:
|
||||
production:
|
||||
- /srv/salt
|
||||
'''
|
||||
''')
|
||||
for formula in formulas:
|
||||
configfh.write(formula)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user