From 1e3a163dca285f907d9d271ebad0bbe8e2bd1435 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Sun, 1 Jan 2023 02:04:24 +0100 Subject: [PATCH] 23b: enable service --- roles/23b/tasks/main.yml | 16 ++++++++-------- .../templates/{23b.service => 23b.service.j2} | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) rename roles/23b/templates/{23b.service => 23b.service.j2} (93%) diff --git a/roles/23b/tasks/main.yml b/roles/23b/tasks/main.yml index 90cfd9d..a1ef34a 100644 --- a/roles/23b/tasks/main.yml +++ b/roles/23b/tasks/main.yml @@ -34,14 +34,14 @@ file: src=/etc/nginx/sites-available/23b dest=/etc/nginx/sites-enabled/23b state=link notify: Restart nginx -#- name: Systemd unit for 23b -# template: src=23b.service.j2 dest=/etc/systemd/system/23b.service -# notify: -# - Reload systemd -# - Restart 23b -# -#- name: Start the 23b service -# service: name=23b state=started enabled=yes +- name: Systemd unit for 23b + template: src=23b.service.j2 dest=/etc/systemd/system/23b.service + notify: + - Reload systemd + - Restart 23b + +- name: Start the 23b service + service: name=23b state=started enabled=yes - name: Enable monitoring include_role: name=icinga-monitor tasks_from=http diff --git a/roles/23b/templates/23b.service b/roles/23b/templates/23b.service.j2 similarity index 93% rename from roles/23b/templates/23b.service rename to roles/23b/templates/23b.service.j2 index f12df30..3f32a2f 100644 --- a/roles/23b/templates/23b.service +++ b/roles/23b/templates/23b.service.j2 @@ -13,7 +13,7 @@ Group=23b Restart=always TimeoutStartSec=1200 -WorkingDirectory=/opt/23b +WorkingDirectory=/opt/23b/23b/23b # Make sure no old containers are running ExecStartPre=/usr/bin/docker-compose down -v