--- - name: Build tags list set_fact: tags_list: "{{ tags_list | default([]) | union([[tag.key,tag.value]|join(':')]) }}" loop: "{{ lookup('dict', ag.tags | default({}, true)) }}" loop_control: loop_var: "tag" - name: Clear ip configuration list set_fact: ip_configurations: [] - name: Set subnet id include: subnetid.yml loop: "{{ agw.frontend_ip_configurations }}" loop_control: loop_var: "fipc" - name: load template template: src: azure_application_gateway.j2 dest: /tmp/azure_application_gateway_body.json changed_when: false - name: Create application gateway azure_rm_resource: ad_user: "{{ azure_ad_user | default(omit) }}" password: "{{ azure_password | default(omit) }}" subscription_id: "{{ azure_subscription_id | default(lookup('env', 'AZURE_SUBSCRIPTION_ID')) }}" client_id: "{{ azure_client_id | default(lookup('env', 'AZURE_CLIENT_ID')) }}" secret: "{{ azure_secret | default(lookup('env', 'AZURE_SECRET')) }}" tenant: "{{ azure_tenant | default(lookup('env', 'AZURE_TENANT')) }}" resource_name: "{{ agw.name | urlencode }}" resource_type: "applicationGateways" resource_group: "{{ agw.resource_group }}" provider: "Network" idempotency: true body: "{{ lookup('file', '/tmp/azure_application_gateway_body.json') }}" method: "{{ agw.method | default(omit, true) }}" subresource: "{{ agw.subresource | default(omit, true) }}" status_code: "{{ agw.status_code | default(omit, true) }}" state: "present" register: createres ...