Compare commits
1 Commits
50c638a000
...
b67e61bd1b
Author | SHA1 | Date | |
---|---|---|---|
b67e61bd1b |
0
bin/nbroles_to_grains.sh
Executable file → Normal file
0
bin/nbroles_to_grains.sh
Executable file → Normal file
@ -6,9 +6,8 @@ import socket
|
|||||||
|
|
||||||
iddir = 'pillar/id/'
|
iddir = 'pillar/id/'
|
||||||
secretiddir = 'pillar/secret/id/'
|
secretiddir = 'pillar/secret/id/'
|
||||||
baseidfile = 'pillar/mock/example.sls'
|
baseidfile = 'atvkdev02_home_lysergic_dev.sls'
|
||||||
myidfile = socket.gethostname() + '.sls'
|
myidfile = socket.gethostname() + '.sls'
|
||||||
|
|
||||||
shutil.copyfile(baseidfile, os.path.join(iddir, myidfile))
|
shutil.copyfile(iddir + baseidfile, iddir + myidfile)
|
||||||
os.makedirs(secretiddir)
|
shutil.copyfile(secretiddir + baseidfile, secretiddir + myidfile)
|
||||||
shutil.copyfile(baseidfile, os.path.join(secretiddir, myidfile))
|
|
||||||
|
13
bin/roles.py
13
bin/roles.py
@ -8,17 +8,10 @@ excluded = ['common-suse', 'minion']
|
|||||||
def get():
|
def get():
|
||||||
for root in ['pillar', 'salt']:
|
for root in ['pillar', 'salt']:
|
||||||
for rootdir, subdirs, files in os.walk(os.path.join(root, 'role')):
|
for rootdir, subdirs, files in os.walk(os.path.join(root, 'role')):
|
||||||
myrootdir = rootdir.split('/')
|
|
||||||
if len(myrootdir) > 2:
|
|
||||||
level = myrootdir[2:]
|
|
||||||
for file in files:
|
for file in files:
|
||||||
splitfile = os.path.splitext(file)
|
role = os.path.splitext(file)[0]
|
||||||
if len(splitfile) == 2 and splitfile[1] == '.sls':
|
if not role in excluded and not role in roles:
|
||||||
role = os.path.splitext(file)[0]
|
roles.append(role)
|
||||||
if len(myrootdir) > 2:
|
|
||||||
role = '.'.join(level) + '.' + role
|
|
||||||
if not role in excluded and not role in roles:
|
|
||||||
roles.append(role)
|
|
||||||
return roles
|
return roles
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -1 +0,0 @@
|
|||||||
This directory contains a sample pillar which is used for mocking and testing runs - the production infrastructure will ignore it. If new pillar options are introduced, it is encouraged to add them along with sample values here.
|
|
@ -1,41 +0,0 @@
|
|||||||
include:
|
|
||||||
- secret.id.{{ salt['grains.get']('id').replace('.', '_') }}
|
|
||||||
|
|
||||||
profile:
|
|
||||||
matterbridge:
|
|
||||||
instances:
|
|
||||||
libertacasa-general:
|
|
||||||
RemoteNickFormat: "{NOPINGNICK}/{LABEL}: "
|
|
||||||
IgnoreFailureOnStart: True
|
|
||||||
MessageSplit: True
|
|
||||||
MediaDownloadPath: /var/lib/matterbridge/libertacasa-general
|
|
||||||
MediaServerDownload: "https://dummy.load.casa"
|
|
||||||
accounts:
|
|
||||||
libertacasa:
|
|
||||||
protocol: irc
|
|
||||||
Nick: mocker02
|
|
||||||
NickServNick: mocker
|
|
||||||
Server: 'irc.casa:6697'
|
|
||||||
UseTLS: True
|
|
||||||
UseSASL: True
|
|
||||||
Label: libcasa
|
|
||||||
Charset: utf8
|
|
||||||
IgnoreNicks: HistServ
|
|
||||||
UseRelayMsg: True
|
|
||||||
RemoteNickFormat: "{NICK}/{PROTOCOL}-{LABEL}"
|
|
||||||
ergo:
|
|
||||||
protocol: irc
|
|
||||||
Nick: mocker
|
|
||||||
Server: 'irc.ergo.chat:6697'
|
|
||||||
UseTLS: True
|
|
||||||
Label: ergo
|
|
||||||
UseRelayMsg: True
|
|
||||||
gateways:
|
|
||||||
foobar:
|
|
||||||
irc.libertacasa: '#dev'
|
|
||||||
irc.ergo: '#chat'
|
|
||||||
lighttpd:
|
|
||||||
vhosts:
|
|
||||||
matterbridge-general:
|
|
||||||
host: mocker.example.com
|
|
||||||
root: /var/lib/matterbridge/libertacasa-general
|
|
2
salt/role/test-webserver.sls
Normal file
2
salt/role/test-webserver.sls
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
include:
|
||||||
|
- profile.test-webserver
|
Loading…
x
Reference in New Issue
Block a user