add option to obtain api token only once

This commit is contained in:
Robert Kaussow 2020-06-23 22:07:03 +02:00
parent af81eb4d20
commit 675f4db8f5
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,8 @@
# @end # @end
# @var corenetworks_dns_default_zone: $ "_unset_" # @var corenetworks_dns_default_zone: $ "_unset_"
corenetworks_dns_token_run_once: False
corenetworks_dns_pip: "pip{{ ansible_python.version.major }}" corenetworks_dns_pip: "pip{{ ansible_python.version.major }}"
corenetworks_dns_delegate_to: localhost corenetworks_dns_delegate_to: localhost

View File

@ -15,6 +15,7 @@
register: __corenetworks register: __corenetworks
when: corenetworks_dns_token is not defined when: corenetworks_dns_token is not defined
delegate_to: "{{ corenetworks_dns_delegate_to }}" delegate_to: "{{ corenetworks_dns_delegate_to }}"
run_once: "{{ corenetworks_dns_token_run_once }}"
- name: Create DNS records - name: Create DNS records
corenetworks_dns: corenetworks_dns: