From 6770035a611ba031677d4cdc9293962acffe5d99 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Thu, 9 Nov 2017 21:44:38 +0100 Subject: [PATCH] Unbreank yanic service --- roles/yanic/{templates => files}/yanic.service | 2 +- roles/yanic/tasks/main.yml | 6 +++--- roles/yanic/templates/{config.toml => config.toml.j2} | 0 .../{yanic-publish.service => yanic-publish.service.j2} | 0 .../{yanic-publish.timer => yanic-publish.timer.j2} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename roles/yanic/{templates => files}/yanic.service (73%) rename roles/yanic/templates/{config.toml => config.toml.j2} (100%) rename roles/yanic/templates/{yanic-publish.service => yanic-publish.service.j2} (100%) rename roles/yanic/templates/{yanic-publish.timer => yanic-publish.timer.j2} (100%) diff --git a/roles/yanic/templates/yanic.service b/roles/yanic/files/yanic.service similarity index 73% rename from roles/yanic/templates/yanic.service rename to roles/yanic/files/yanic.service index 82e44a5..200835b 100644 --- a/roles/yanic/templates/yanic.service +++ b/roles/yanic/files/yanic.service @@ -4,7 +4,7 @@ Description=yanic [Service] Type=simple User=yanic -ExecStart=/opt/go/bin/yanic -config /etc/yanic.conf +ExecStart=/opt/go/bin/yanic serve --config /etc/yanic.conf Restart=always RestartSec=5s Environment=PATH=/usr/bin:/usr/local/bin diff --git a/roles/yanic/tasks/main.yml b/roles/yanic/tasks/main.yml index f685dc0..5b8cdce 100644 --- a/roles/yanic/tasks/main.yml +++ b/roles/yanic/tasks/main.yml @@ -10,7 +10,7 @@ notify: Restart yanic - name: Configure yanic - template: src=config.toml dest=/etc/yanic.conf + template: src=config.toml.j2 dest=/etc/yanic.conf notify: Restart yanic - name: Create directories @@ -20,7 +20,7 @@ - /var/lib/yanic - name: Install system unit - template: src=yanic.service dest=/lib/systemd/system/yanic.service + copy: src=yanic.service dest=/lib/systemd/system/yanic.service notify: - Reload systemd - Restart yanic @@ -29,7 +29,7 @@ service: name=yanic enabled=yes - name: Install system publish unit - template: src={{ item }} dest=/lib/systemd/system/{{ item }} + template: src={{ item }}.j2 dest=/lib/systemd/system/{{ item }} when: yanic_publisher with_items: - yanic-publish.service diff --git a/roles/yanic/templates/config.toml b/roles/yanic/templates/config.toml.j2 similarity index 100% rename from roles/yanic/templates/config.toml rename to roles/yanic/templates/config.toml.j2 diff --git a/roles/yanic/templates/yanic-publish.service b/roles/yanic/templates/yanic-publish.service.j2 similarity index 100% rename from roles/yanic/templates/yanic-publish.service rename to roles/yanic/templates/yanic-publish.service.j2 diff --git a/roles/yanic/templates/yanic-publish.timer b/roles/yanic/templates/yanic-publish.timer.j2 similarity index 100% rename from roles/yanic/templates/yanic-publish.timer rename to roles/yanic/templates/yanic-publish.timer.j2