blob: bfdd83b49802e30a7b154024fc098e024143c0de [file] [log] [blame]
Tomáš Levora290bf402018-12-19 15:47:04 +01001---
2- name: Ensure cfg directory exist
3 file:
4 path: "{{ app_data_path }}/cfg"
5 state: directory
6
Jan Benedikt2dcd2982020-02-10 15:44:01 +01007- name: Stop systemd-resolved daemon - Ubuntu
8 systemd:
9 name: systemd-resolved
10 state: stopped
11 when: ansible_distribution in ["Ubuntu","Debian"]
12
Tomáš Levora290bf402018-12-19 15:47:04 +010013- name: Create simulated hostnames file
14 template:
15 src: simulated_hosts.j2
16 dest: "{{ app_data_path }}/cfg/simulated_hosts"
Bartek Grzybowski25d56e32019-05-10 09:29:10 +020017 notify: Run dns server container
Tomáš Levora290bf402018-12-19 15:47:04 +010018
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010019- name: Load dns server container
Tomáš Levora290bf402018-12-19 15:47:04 +010020 docker_image:
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010021 name: "{{ dns_server_image }}"
22 load_path: "{{ infra_images_path }}/{{ dns_server_image_tar }}"
Tomáš Levora290bf402018-12-19 15:47:04 +010023 state: present
24 timeout: 120
Bartek Grzybowski25d56e32019-05-10 09:29:10 +020025 notify: Run dns server container
Tomáš Levora290bf402018-12-19 15:47:04 +010026
Bartek Grzybowski25d56e32019-05-10 09:29:10 +020027- name: Enumerate running containers
28 docker_list_containers:
29 register: containers_list
30
31- name: Ensure dns container is running
32 command: /bin/true
33 notify: Run dns server container
34 when: "'dns-server' not in containers_list.containers"
Michal Ptacekb1fe7852019-05-21 08:01:33 +000035
36- name: Force notified handlers to run at this point
37 meta: flush_handlers