1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/azure_rm_appserviceplan/tasks/main.yml
Yunge Zhu 5088f7c926 add azure_rm_appserviceplan module (#40906)
* add azure_rm_appserviceplan module

* fix lint in test

* fix lint

* fix test

* fix test syntax

* resolve comments

* fix test
2018-08-07 15:54:31 -07:00

72 lines
1.7 KiB
YAML

- name: Prepare facts
set_fact:
linux_plan_resource_group: "{{ resource_group_secondary }}"
win_plan_name: "{{ (resource_prefix | replace('-','x'))[-8:] }}winplan"
linux_plan_name: "{{ (resource_group_secondary | replace('-','x'))[-8:] }}linplan"
- name: create a windows plan
azure_rm_appserviceplan:
name: "{{ win_plan_name }}1"
resource_group: "{{ resource_group }}"
sku: B1
register: output
- name: assert app service was created
assert:
that:
- output.changed
- output.id
- name: create a linux plan
azure_rm_appserviceplan:
resource_group: "{{ linux_plan_resource_group }}"
name: "{{ linux_plan_name }}1"
sku: S1
is_linux: true
number_of_workers: 1
register: output
- name: assert app service was created
assert:
that:
- output.changed
- output.id
- name: create linux app service plan idempotent
azure_rm_appserviceplan:
resource_group: "{{ linux_plan_resource_group }}"
name: "{{ linux_plan_name }}1"
sku: S1
is_linux: true
number_of_workers: 1
register: output
- name: assert app service was created
assert:
that: not output.changed
- name: update a windows plan sku
azure_rm_appserviceplan:
name: "{{ win_plan_name }}1"
resource_group: "{{ resource_group }}"
sku: B2
register: output
- name: assert app service was updated
assert:
that:
- output.changed
- name: update a linux plan number of workers
azure_rm_appserviceplan:
resource_group: "{{ linux_plan_resource_group }}"
name: "{{ linux_plan_name }}1"
sku: S1
is_linux: true
number_of_workers: 2
register: output
- name: assert app service was updated
assert:
that:
- output.changed