1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Use variable for domain name (#28806)

This commit is contained in:
Harold Wong 2017-08-29 18:15:09 -07:00 committed by Matt Davis
parent c77cc48971
commit ef660f87b0

View file

@ -1,7 +1,11 @@
- name: Create random domain name
set_fact:
domain_name: "{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
- name: Create a DNS zone
azure_rm_dnszone:
resource_group: "{{ resource_group }}"
name: testing.com
name: "{{ domain_name }}.com"
state: present
register: results
@ -11,7 +15,7 @@
- name: Update DNS zone with tags
azure_rm_dnszone:
resource_group: "{{ resource_group }}"
name: testing.com
name: "{{ domain_name }}.com"
state: present
tags:
test: modified
@ -25,7 +29,7 @@
- name: Test check_mode
azure_rm_dnszone:
resource_group: "{{ resource_group }}"
name: testing.com
name: "{{ domain_name }}.com"
state: present
tags:
test: new_modified
@ -41,5 +45,5 @@
- name: Delete DNS zone
azure_rm_dnszone:
resource_group: "{{ resource_group }}"
name: testing.com
name: "{{ domain_name }}.com"
state: absent