started with templates
This commit is contained in:
parent
0697d65438
commit
13a4423259
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# defaults file for deploy_adguard
|
# defaults file for deploy_adguard
|
||||||
deploy_adguard_directory: /adguard
|
deploy_adguard_directory: /opt/adguard
|
||||||
deploy_adguard_timezone: "Europe/Paris"
|
deploy_adguard_timezone: "Europe/Paris"
|
||||||
deploy_adguard_enable_admin_interface: true
|
deploy_adguard_enable_admin_interface: true
|
||||||
deploy_adguard_enable_dhcp: false
|
deploy_adguard_enable_dhcp: false
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# task/configure file for deploy_adguard
|
||||||
|
- name: "Copy docker-compose.yml template"
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "docker-compose.yml.j2"
|
||||||
|
dest: "{{ deploy_adguard_directory }}/docker-compose.yml"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0600'
|
13
templates/adguard.service.j2
Normal file
13
templates/adguard.service.j2
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Some personal Docker containers
|
||||||
|
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"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
0
templates/docker-compose.yml.j2
Normal file
0
templates/docker-compose.yml.j2
Normal file
Loading…
Reference in New Issue
Block a user