xoxys.ucs_dns/tasks/setup.yml

25 lines
816 B
YAML
Raw Normal View History

2020-05-12 20:42:53 +00:00
---
- 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
- ucs_dns_become_password
- 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.value | default(omit) }}"
state: "{{ item.state | default('present') }}"
2020-05-13 10:55:37 +00:00
loop: "{{ ucs_dns_records + ucs_dns_records_extra }}"
2020-05-12 20:42:53 +00:00
loop_control:
label: "{{ item.zone }}:{{ item.name }}"
delegate_to: "{{ ucs_dns_delegate_to }}"
become: True
become_user: root