Add systemd service for internal_named. Try internal_named container restart if DNS test is KO.
This commit is contained in:
parent
9648366e8b
commit
ae615b630a
@ -60,8 +60,34 @@
|
||||
- /usr/local/docker-mounted-files/docker-internal_named/named.conf.options:/etc/bind/named.conf.options:z
|
||||
- /usr/local/docker-mounted-files/docker-internal_named/named.conf.local:/etc/bind/named.conf.local:z
|
||||
- /mnt/volumes/var_cache_internal_named/data:/var/cache/bind:z
|
||||
state: present
|
||||
generate_systemd:
|
||||
path: /etc/systemd/system
|
||||
become: true
|
||||
|
||||
- name: start/enable container service
|
||||
ansible.builtin.systemd:
|
||||
daemon-reload: true
|
||||
name: internal_named
|
||||
state: started
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- block:
|
||||
- name: check DNS
|
||||
command: host scimetis.net 127.0.0.1
|
||||
changed_when: false
|
||||
register: check_dns
|
||||
until: "check_dns is not failed"
|
||||
retries: 10
|
||||
delay: 10
|
||||
rescue:
|
||||
- name: restart internal_named
|
||||
ansible.builtin.service:
|
||||
name: internal_named
|
||||
state: restarted
|
||||
become: true
|
||||
|
||||
- name: check DNS
|
||||
command: host scimetis.net 127.0.0.1
|
||||
changed_when: false
|
||||
|
Loading…
Reference in New Issue
Block a user