mirror of
https://github.com/idealista/cookiecutter-ansible-role.git
synced 2024-11-28 19:06:08 +01:00
22 lines
738 B
YAML
22 lines
738 B
YAML
---
|
|
|
|
- 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 }}
|
|
tags:
|
|
- {{ cookiecutter.app_name }}_service
|
|
|
|
- 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 %}"
|
|
daemon_reload: yes
|
|
tags:
|
|
- {{ cookiecutter.app_name }}_service
|