xoxys.ucs_dns/tasks/setup.yml

23 lines
801 B
YAML
Raw Permalink 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
2020-05-13 12:04:56 +00:00
when: ucs_dns_become_password is defined
2020-05-12 20:42:53 +00:00
- name: Create DNS records
udm_dns_record:
name: "{{ item.name }}"
2020-05-13 11:03:45 +00:00
zone: "{{ item.zone | default(ucs_dns_default_zone) }}"
2020-05-12 20:42:53 +00:00
type: "{{ item.type | default('host_record') }}"
2020-05-14 13:22:50 +00:00
data: "{{ item.data | default(omit) }}"
2020-05-12 20:42:53 +00:00
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:
2020-05-13 11:03:45 +00:00
label: "{{ item.zone | default(ucs_dns_default_zone) }}:{{ item.name }}"
2020-05-12 20:42:53 +00:00
delegate_to: "{{ ucs_dns_delegate_to }}"
become: True
become_user: root