This repository has been archived on 2022-06-20. You can view files and clone it, but cannot push or open issues or pull requests.
xoxys.corenetworks_dns/tasks/setup.yml
Robert Kaussow db851bfa19
Some checks failed
continuous-integration/drone/push Build is failing
initial commit
2020-05-12 21:57:32 +02:00

19 lines
721 B
YAML

---
- name: Obtain an API token
corenetworks_token:
api_user: "{{ corenetworks_dns_api_user | default(omit) }}"
api_password: "{{ corenetworks_dns_api_password | default(omit) }}"
register: __corenetworks
- name: Create DNS records
corenetworks_dns:
api_token: "{{ __corenetworks.session.token }}"
zone: "{{ item.zone | default('corenetworks_dns_default_zone') }}"
record: "{{ item.record | default(omit) }}"
type: "{{ item.type | default(omit) }}"
value: "{{ item.value | default(omit) }}"
state: "{{ item.state | default('present') }}"
loop: corenetworks_dns_records + corenetworks_dns_records_extra
loop_control:
label: "{{ item.zone }}:{{ item.record | default('@') }}"