Ansible repository with playbooks to manage azure objects
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

45 行
1.5 KiB

  1. ---
  2. - name: Build tags list
  3. set_fact:
  4. tags_list: "{{ tags_list | default([]) | union([[tag.key,tag.value]|join(':')]) }}"
  5. loop: "{{ lookup('dict', ag.tags | default({}, true)) }}"
  6. loop_control:
  7. loop_var: "tag"
  8. - name: Clear ip configuration list
  9. set_fact:
  10. ip_configurations: []
  11. - name: Set subnet id
  12. include: subnetid.yml
  13. loop: "{{ agw.frontend_ip_configurations }}"
  14. loop_control:
  15. loop_var: "fipc"
  16. - name: load template
  17. template:
  18. src: azure_application_gateway.j2
  19. dest: /tmp/azure_application_gateway_body.json
  20. changed_when: false
  21. - name: Create application gateway
  22. azure_rm_resource:
  23. ad_user: "{{ azure_ad_user | default(omit) }}"
  24. password: "{{ azure_password | default(omit) }}"
  25. subscription_id: "{{ azure_subscription_id | default(lookup('env', 'AZURE_SUBSCRIPTION_ID')) }}"
  26. client_id: "{{ azure_client_id | default(lookup('env', 'AZURE_CLIENT_ID')) }}"
  27. secret: "{{ azure_secret | default(lookup('env', 'AZURE_SECRET')) }}"
  28. tenant: "{{ azure_tenant | default(lookup('env', 'AZURE_TENANT')) }}"
  29. resource_name: "{{ agw.name | urlencode }}"
  30. resource_type: "applicationGateways"
  31. resource_group: "{{ agw.resource_group }}"
  32. provider: "Network"
  33. idempotency: true
  34. body: "{{ lookup('file', '/tmp/azure_application_gateway_body.json') }}"
  35. method: "{{ agw.method | default(omit, true) }}"
  36. subresource: "{{ agw.subresource | default(omit, true) }}"
  37. status_code: "{{ agw.status_code | default(omit, true) }}"
  38. state: "present"
  39. register: createres
  40. ...