xoxys.ucs_dns/tasks/setup.yml
Robert Kaussow c1123aed4f
All checks were successful
continuous-integration/drone/push Build is passing
fix variable name
2020-05-14 15:22:50 +02:00

23 lines
801 B
YAML

---
- block:
- name: Delegate become password
set_fact:
ansible_become_pass: "{{ ucs_dns_become_password }}"
delegate_to: "{{ ucs_dns_delegate_to }}"
delegate_facts: True
when: ucs_dns_become_password is defined
- name: Create DNS records
udm_dns_record:
name: "{{ item.name }}"
zone: "{{ item.zone | default(ucs_dns_default_zone) }}"
type: "{{ item.type | default('host_record') }}"
data: "{{ item.data | default(omit) }}"
state: "{{ item.state | default('present') }}"
loop: "{{ ucs_dns_records + ucs_dns_records_extra }}"
loop_control:
label: "{{ item.zone | default(ucs_dns_default_zone) }}:{{ item.name }}"
delegate_to: "{{ ucs_dns_delegate_to }}"
become: True
become_user: root