mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
6 years ago
|
- 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
|