You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
648 B
28 lines
648 B
2 years ago
|
- name: add default record
|
||
|
include_tasks:
|
||
|
file: add_record.yml
|
||
|
apply:
|
||
|
delegate_to: "{{ services.internal_ns }}"
|
||
|
vars:
|
||
|
record: {}
|
||
|
when: (records | d([]) | length) == 0
|
||
|
|
||
|
|
||
|
- name: process other items
|
||
|
include_tasks:
|
||
|
file: add_record.yml
|
||
|
apply:
|
||
|
delegate_to: "{{ services.internal_ns }}"
|
||
|
loop: "{{ records | d([]) }}"
|
||
|
loop_control:
|
||
|
loop_var: record
|
||
|
|
||
|
|
||
|
- name: restart coredns
|
||
|
service:
|
||
|
name: coredns
|
||
|
state: restarted
|
||
|
delegate_to: "{{ services.internal_ns }}"
|
||
|
when: (ns_instant | d(false) == false) and
|
||
|
((ns_records_changed | d(false) == true) or (ns_serial_changed | d(false) == true))
|