cookiecutter-ansible-role/{{cookiecutter.app_name}}_role/tasks/service.yml

21 lines
737 B
YAML
Raw Normal View History

2020-04-28 13:23:10 +02:00
---
- name: {{ cookiecutter.app_name | upper }} | Copy Daemon script
template:
src: {{ cookiecutter.app_name }}.service.j2
dest: /etc/systemd/system/{{ cookiecutter.app_name }}.service
mode: 0644
owner: root
group: root
notify: restart {{ cookiecutter.app_name }}
2021-01-19 10:03:27 +01:00
tags:
- {{ cookiecutter.app_name }}_service
2020-04-28 13:23:10 +02:00
- name: {{ cookiecutter.app_name | upper }} | Configuring service
systemd:
name: {{ cookiecutter.app_name }}
state: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_service_state {% raw %}}}{% endraw %}"
enabled: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_service_enabled {% raw %}}}{% endraw %}"
2021-01-19 10:03:27 +01:00
daemon_reload: yes
tags:
- {{ cookiecutter.app_name }}_service