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': { 'content_type': 'mako', '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', }, }, }