Compare commits
3 Commits
50c638a000
...
e5e9685113
Author | SHA1 | Date | |
---|---|---|---|
e5e9685113 | |||
5e262f5f5f | |||
7f9bf11048 |
12
bin/clone_formulas.sh
Executable file
12
bin/clone_formulas.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -Ceu
|
||||
|
||||
FORMULASDIR='/srv/formulas'
|
||||
|
||||
if [ ! -d "$FORMULASDIR" ]
|
||||
then
|
||||
git clone --recurse-submodules --single-branch -b production https://git.com.de/LibertaCasa/salt-formulas.git "$FORMULASDIR"
|
||||
exit "$?"
|
||||
fi
|
||||
|
||||
git -C "$FORMULASDIR" pull --recurse-submodules
|
@ -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')
|
||||
|
1
salt/role/salt/common.sls
Normal file
1
salt/role/salt/common.sls
Normal file
@ -0,0 +1 @@
|
||||
# empty
|
Loading…
x
Reference in New Issue
Block a user