From ef660f87b012fb2b2ef388f41a9b6520e6a65ded Mon Sep 17 00:00:00 2001 From: Harold Wong Date: Tue, 29 Aug 2017 18:15:09 -0700 Subject: [PATCH] Use variable for domain name (#28806) --- .../targets/azure_rm_dnszone/tasks/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/azure_rm_dnszone/tasks/main.yml b/test/integration/targets/azure_rm_dnszone/tasks/main.yml index 48c13bd1780..44a3be6f79a 100644 --- a/test/integration/targets/azure_rm_dnszone/tasks/main.yml +++ b/test/integration/targets/azure_rm_dnszone/tasks/main.yml @@ -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