services/roles/acme_dns/tasks/main.yml

32 lines
943 B
YAML
Raw Normal View History

---
2023-12-14 01:20:13 +00:00
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
2023-06-13 21:32:09 +00:00
- name: Deploy {{ svc.name }}
2023-12-14 01:20:13 +00:00
vars:
svc: "{{ acme_dns_svc }}"
env: "{{ acme_dns_env }}"
compose: "{{ acme_dns_compose }}"
block:
2023-12-13 01:43:15 +00:00
- name: Import prepare tasks for common service
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
2023-06-13 20:36:13 +00:00
- name: Setting the service config path
ansible.builtin.set_fact:
config_path: "{{ (service_path, 'config') | path_join }}"
2023-06-13 20:17:14 +00:00
2023-06-13 20:36:13 +00:00
- name: Create a service-config directory
ansible.builtin.file:
path: "{{ config_path }}"
state: directory
2023-06-13 20:17:14 +00:00
mode: "0700"
2023-06-13 20:36:13 +00:00
- name: Template config
ansible.builtin.template:
src: config.cfg.j2
dest: "{{ (config_path, 'config.cfg') | path_join }}"
2023-06-13 20:17:14 +00:00
mode: "0600"
2023-12-13 01:43:15 +00:00
- name: Import start tasks for common service
ansible.builtin.import_tasks: tasks/start-common-service.yml