allow to use a pre-defined token
This commit is contained in:
parent
f34bbddf3f
commit
af81eb4d20
@ -13,11 +13,12 @@
|
||||
api_user: "{{ corenetworks_dns_api_user | default(omit) }}"
|
||||
api_password: "{{ corenetworks_dns_api_password | default(omit) }}"
|
||||
register: __corenetworks
|
||||
when: corenetworks_dns_token is not defined
|
||||
delegate_to: "{{ corenetworks_dns_delegate_to }}"
|
||||
|
||||
- name: Create DNS records
|
||||
corenetworks_dns:
|
||||
api_token: "{{ __corenetworks.session.token }}"
|
||||
api_token: "{{ corenetworks_dns_token if corenetworks_dns_token is defined else __corenetworks.session.token }}"
|
||||
zone: "{{ item.zone | default(corenetworks_dns_default_zone) }}"
|
||||
record: "{{ item.record | default(omit) }}"
|
||||
type: "{{ item.type | default(omit) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user