Add basic ansible stuff for management
acme-dns is fully handled by ansible already. All services should be created by ansible in the end.
This commit is contained in:
parent
607ad23697
commit
7ff7dfe807
16 changed files with 162 additions and 3 deletions
_ansible/roles/acme-dns/tasks
32
_ansible/roles/acme-dns/tasks/main.yml
Normal file
32
_ansible/roles/acme-dns/tasks/main.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
- name: Deploy acme-dns
|
||||
tags: acme-dns
|
||||
vars:
|
||||
service_path: "{{ (services_path, 'acme-dns') | path_join }}"
|
||||
config_path: "{{ (service_path, 'config') | path_join }}"
|
||||
block:
|
||||
- name: Create a service directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ service_path }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
- name: Create a service-config directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ config_path }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Template acme-dns docker-compose
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ (service_path, 'docker-compose.yml') | path_join }}"
|
||||
|
||||
- name: Template acme-dns config
|
||||
ansible.builtin.template:
|
||||
src: config.cfg.j2
|
||||
dest: "{{ (config_path, 'config.cfg') | path_join }}"
|
||||
|
||||
- name: Template acme-dns caddy config
|
||||
ansible.builtin.template:
|
||||
src: caddy_site.conf.j2
|
||||
dest: "{{ (caddy_config_path, service.domain + '.conf') | path_join }}"
|
Reference in a new issue