2021-12-21 09:48:22 +00:00
|
|
|
directories = {
|
|
|
|
'/opt/ldap-frontend/src': {},
|
|
|
|
}
|
|
|
|
|
|
|
|
git_deploy = {
|
|
|
|
'/opt/ldap-frontend/src': {
|
|
|
|
'repo': 'https://git.franzi.business/qzwi/ldap-frontend.git',
|
|
|
|
'rev': 'main',
|
|
|
|
'triggers': {
|
|
|
|
'action:ldap-frontend_install_deps',
|
|
|
|
'svc_systemd:ldap-frontend:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
actions = {
|
|
|
|
'ldap-frontend_make_virtualenv': {
|
|
|
|
'command': 'virtualenv -p python3 /opt/ldap-frontend/venv',
|
|
|
|
'unless': 'test -d /opt/ldap-frontend/venv',
|
|
|
|
'needs': {
|
|
|
|
'directory:/opt/ldap-frontend/src',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'ldap-frontend_install_deps': {
|
|
|
|
'triggered': True,
|
|
|
|
'command': ' && '.join([
|
|
|
|
'cd /opt/ldap-frontend/src',
|
|
|
|
'/opt/ldap-frontend/venv/bin/pip install --upgrade -r requirements.txt',
|
|
|
|
]),
|
|
|
|
'needs': {
|
|
|
|
'action:ldap-frontend_make_virtualenv',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
|
|
|
'/etc/systemd/system/ldap-frontend.service': {
|
2021-12-22 06:34:53 +00:00
|
|
|
'content_type': 'mako',
|
2021-12-21 09:48:22 +00:00
|
|
|
'triggers': {
|
|
|
|
'action:systemd-reload',
|
|
|
|
'svc_systemd:ldap-frontend:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/opt/ldap-frontend/config.json': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:ldap-frontend:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
'ldap-frontend': {
|
|
|
|
'needs': {
|
|
|
|
'action:ldap-frontend_install_deps',
|
|
|
|
'file:/etc/systemd/system/ldap-frontend.service',
|
|
|
|
'file:/opt/ldap-frontend/config.json',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|