bundles/mx-puppet-discord: create registration.yaml using bw
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
bf7e982fdb
commit
0784b85fbb
3 changed files with 33 additions and 14 deletions
|
@ -15,7 +15,17 @@ files = {
|
|||
'action:mx-puppet-discord_chown',
|
||||
},
|
||||
'triggers': {
|
||||
'action:mx-puppet-discord_generate_registration',
|
||||
'svc_systemd:mx-puppet-discord:restart',
|
||||
},
|
||||
},
|
||||
'/opt/mx-puppet-discord/registration.yaml': {
|
||||
'owner': 'mx-puppet-discord',
|
||||
'content_type': 'mako',
|
||||
'needs': {
|
||||
'git_deploy:/opt/mx-puppet-discord',
|
||||
'action:mx-puppet-discord_chown',
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:mx-puppet-discord:restart',
|
||||
},
|
||||
},
|
||||
|
@ -62,27 +72,18 @@ actions = {
|
|||
},
|
||||
'triggered': True,
|
||||
},
|
||||
'mx-puppet-discord_generate_registration': {
|
||||
'command': 'cd /opt/mx-puppet-discord && $(rm /opt/mx-puppet-discord/registration.yaml || true) && sudo -u mx-puppet-discord node ./build/index.js -r -c /opt/mx-puppet-discord/config.yaml -f /opt/mx-puppet-discord/registration.yaml',
|
||||
'needs': {
|
||||
'user:mx-puppet-discord',
|
||||
'action:mx-puppet-discord_npm_build',
|
||||
'directory:/var/log/mx-puppet-discord',
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:mx-puppet-discord:restart',
|
||||
},
|
||||
'triggered': True,
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd = {
|
||||
'mx-puppet-discord': {
|
||||
'needs': {
|
||||
'action:mx-puppet-discord_npm_build',
|
||||
'file:/etc/systemd/system/mx-puppet-discord.service',
|
||||
'file:/opt/mx-puppet-discord/config.yaml',
|
||||
'file:/opt/mx-puppet-discord/registration.yaml',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if node.has_bundle('matrix-synapse'):
|
||||
actions['mx-puppet-discord_generate_registration']['triggers'].add('svc_systemd:matrix-synapse:restart')
|
||||
files['/opt/mx-puppet-discord/registration.yaml']['triggers'].add('svc_systemd:matrix-synapse:restart')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue