update service template

This commit is contained in:
Bertrand Lanson 2023-06-01 23:02:50 +02:00
parent 0c21da9a40
commit 564cb99891
2 changed files with 5 additions and 5 deletions

View File

@ -5,13 +5,13 @@
daemon_reload: true
listen: "systemctl-daemon-reload"
- name: "Enable consul service"
- name: "Enable adguard service"
ansible.builtin.service:
name: adguard
enabled: true
listen: "systemctl-enable-adguard"
- name: "Start consul service"
- name: "Start adguard service"
ansible.builtin.service:
name: adguard
state: restarted

View File

@ -1,13 +1,13 @@
[Unit]
Description=Some personal Docker containers
Description=Free and open source, powerful network-wide ads & trackers blocking DNS server.
After=docker.service
Requires=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "docker compose -f {{ deploy_adguard_directory }}/docker-compose.yml up --detach"
ExecStop=/bin/bash -c "docker compose -f {{ deploy_adguard_directory }}/docker-compose.yml stop"
ExecStart=/bin/bash -c "docker-compose -f {{ deploy_adguard_directory }}/docker-compose.yml up --detach"
ExecStop=/bin/bash -c "docker-compose -f {{ deploy_adguard_directory }}/docker-compose.yml down"
[Install]
WantedBy=multi-user.target