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

73 lines
1.7 KiB
YAML
Raw Normal View History

- 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