mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-23 12:33:59 -07:00
start/stop/restart azure webapp (#44498)
* add webapp start/stop/restart * disable test with facts * fix lint * fix lint * fix check mode * rename power_action to app_state * refine names of choices * fix renaming bug
This commit is contained in:
parent
408868ed49
commit
2bd0a66c08
2 changed files with 85 additions and 2 deletions
|
|
@ -22,6 +22,31 @@
|
|||
plan: "{{ win_plan_name }}"
|
||||
register: output
|
||||
|
||||
- name: stop the web app
|
||||
azure_rm_webapp:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "{{ win_app_name }}2"
|
||||
plan: "{{ win_plan_name }}"
|
||||
app_state: stopped
|
||||
register: output
|
||||
|
||||
- name: assert output changed
|
||||
assert:
|
||||
that:
|
||||
output.changed
|
||||
|
||||
# enable after webapp_facts merged
|
||||
# - name: get the web app
|
||||
# azure_rm_webapp_facts:
|
||||
# resource_group: "{{ resource_group }}"
|
||||
# name: "{{ win_app_name }}2"
|
||||
# register: stopped
|
||||
|
||||
# - name: assert web app is stopped
|
||||
# assert:
|
||||
# that:
|
||||
# - stopped.properties.state == "Stopped"
|
||||
|
||||
- name: Create a windows web app with existing app service plan, try to update some root level params
|
||||
azure_rm_webapp:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
|
@ -251,4 +276,4 @@
|
|||
|
||||
- name: Assert the web app was created
|
||||
assert:
|
||||
that: output.changed
|
||||
that: output.changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue