mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
add azure_rm_webapp_facts module (#43631)
* add webapp facts module * remove certified * remove useless argument * add tests * return curated output * add description of return value, move test to webapp folder * fix lint * fix lint * fix lint * fix test * fix bug * fix test, will get all webapp with same tag created by previous test * fix test * fix test * fix test * add properties description, refine return name * refine properties, add request_id when exception * fix bug * update doc, add publish profile * fix error * flatten properties, add option for return publish profile
This commit is contained in:
parent
3b5b15ee5a
commit
b731732616
4 changed files with 406 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
cloud/azure
|
||||
shippable/azure/group4
|
||||
destructive
|
||||
destructive
|
||||
azure_rm_webapp_facts
|
|
@ -54,8 +54,22 @@
|
|||
plan: "{{ win_plan_name }}"
|
||||
dns_registration: true
|
||||
https_only: true
|
||||
tags:
|
||||
testwebapptag: test
|
||||
register: output
|
||||
|
||||
- name: get web app with resource group and tag
|
||||
azure_rm_webapp_facts:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "{{ win_app_name }}3"
|
||||
tags:
|
||||
- testwebapptag
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.webapps | length == 1
|
||||
|
||||
- name: Create a win web app with java run time specific
|
||||
azure_rm_webapp:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
@ -71,10 +85,22 @@
|
|||
testkey: "testvalue"
|
||||
register: output
|
||||
|
||||
- name: assert the function was created
|
||||
- name: assert the web app was created
|
||||
assert:
|
||||
that: output.changed
|
||||
|
||||
- name: get web app with name
|
||||
azure_rm_webapp_facts:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "{{ win_app_name }}4"
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.webapps | length == 1
|
||||
- output.webapps[0].app_settings | length == 1
|
||||
- output.webapps[0].frameworks | length > 1 # there's default frameworks eg net_framework
|
||||
|
||||
- name: Update app settings
|
||||
azure_rm_webapp:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
@ -90,10 +116,23 @@
|
|||
testkey2: "testvalue2"
|
||||
register: output
|
||||
|
||||
- name: Assert the web app was created
|
||||
- name: Assert the web app was updated
|
||||
assert:
|
||||
that: output.changed
|
||||
|
||||
- name: get web app with return publishing profile
|
||||
azure_rm_webapp_facts:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "{{ win_app_name }}4"
|
||||
return_publish_profile: true
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.webapps | length == 1
|
||||
- output.webapps[0].publishing_username != ""
|
||||
- output.webapps[0].publishing_password != ""
|
||||
|
||||
- name: Purge all existing app settings
|
||||
azure_rm_webapp:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
@ -102,7 +141,7 @@
|
|||
purge_app_settings: true
|
||||
register: output
|
||||
|
||||
- name: Assert the web app was created
|
||||
- name: Assert the web app was updated
|
||||
assert:
|
||||
that: output.changed
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue