Compare commits

..

3 Commits

Author SHA1 Message Date
9aa39f97e4
mta.postfix->global.mta pillar; remove mta profile
Some checks failed
ci/lysergic/push/pipeline Pipeline failed
This is more a MTA configuration for system email on all hosts instead of
a dedicated email server role.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-26 19:46:43 +01:00
2a5962e292
Move common to global pillar
Some checks failed
ci/lysergic/push/pipeline Pipeline failed
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-26 19:30:15 +01:00
73df34c558
Read formulas from central file
Some checks failed
ci/lysergic/push/pipeline Pipeline failed
- add formulas.yaml file containing list of all enabled formulas
- read formulas from said file in role.salt.master and prepare_minion.py
- add symlink for easier tracking of the file

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-26 18:58:09 +01:00

View File

@ -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 = 'formulas.yaml'
formulasfile = os.path.join('..', '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=yaml.FullLoader)
formulas = yaml.load(formulasfh, Loader=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)