diff options
author | Georg Pfuetzenreuter | 2023-01-21 19:51:39 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-21 19:51:39 +0100 |
commit | 5e262f5f5f6f8c831d277f7bcb312505851ec973 (patch) | |
tree | 3fe5b2b5dd06ffe346c9ce864386b31372052d0e /bin | |
parent | 7f9bf110488dde7113d685b2d0361fa55b003560 (diff) | |
download | salt-5e262f5f5f6f8c831d277f7bcb312505851ec973.tar.gz salt-5e262f5f5f6f8c831d277f7bcb312505851ec973.tar.bz2 salt-5e262f5f5f6f8c831d277f7bcb312505851ec973.zip |
Configure formulas in prepare_minion.py
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/prepare_minion.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/prepare_minion.py b/bin/prepare_minion.py index a4aee0c..862df1b 100755 --- a/bin/prepare_minion.py +++ b/bin/prepare_minion.py @@ -9,6 +9,7 @@ import socket roles = roles.get() grainsfile = '/etc/salt/grains' idfile = 'pillar/id/' + socket.gethostname() + '.sls' +configfile = '/etc/salt/minion.d/local.conf' mypwd = os.getcwd() grainsdata = {'roles': roles} @@ -19,5 +20,13 @@ with open(grainsfile, mode='w') as grainsfh: with open(idfile, mode='w') as idfh: idfh.write('# empty') +with open(configfile, mode='w') as configfh: + configfh.write('''# written by prepare_minion.py +file_roots: + production: + - /srv/salt + - /srv/formulas/salt-formula +''') + os.symlink(mypwd + '/salt', '/srv/salt') os.symlink(mypwd + '/pillar', '/srv/pillar') |