blob: a0e403360411e9bf7f2282fa5ed31aa6e5af71e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
- name: Ensure cfg directory exist
file:
path: "{{ app_data_path }}/cfg"
state: directory
- name: Stop systemd-resolved daemon - Ubuntu
systemd:
name: systemd-resolved
state: stopped
when: ansible_distribution in ["Ubuntu","Debian"]
- name: Create simulated hostnames file
template:
src: simulated_hosts.j2
dest: "{{ app_data_path }}/cfg/simulated_hosts"
notify: Run dns server container
- name: Load dns server container
docker_image:
name: "{{ dns_server_image }}"
load_path: "{{ infra_images_path }}/{{ dns_server_image_tar }}"
state: present
source: load
timeout: 120
notify: Run dns server container
- name: Enumerate running containers
docker_list_containers:
register: containers_list
- name: Ensure dns container is running
command: /bin/true
notify: Run dns server container
when: "'dns-server' not in containers_list.containers"
- name: Force notified handlers to run at this point
meta: flush_handlers
|