mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixing function app test (#37687)
This commit is contained in:
parent
c7701fd4ac
commit
fcd75bbc5a
2 changed files with 17 additions and 12 deletions
|
@ -1,2 +1,3 @@
|
|||
cloud/azure
|
||||
posix/ci/cloud/group2/azure
|
||||
destructive
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
- name: Fix resource prefix
|
||||
set_fact:
|
||||
fixed_resource_prefix: "{{ resource_prefix | replace('-','x') }}"
|
||||
|
||||
- name: create storage account for function apps
|
||||
azure_rm_storageaccount:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfunccistor4
|
||||
name: sa{{ fixed_resource_prefix }}
|
||||
account_type: Standard_LRS
|
||||
|
||||
- name: create basic function app
|
||||
azure_rm_functionapp:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfuncci
|
||||
storage_account: azfunccistor4
|
||||
name: af{{ fixed_resource_prefix }}
|
||||
storage_account: sa{{ fixed_resource_prefix }}
|
||||
register: output
|
||||
|
||||
- name: assert the function was created
|
||||
|
@ -18,19 +22,19 @@
|
|||
- name: list facts for function
|
||||
azure_rm_functionapp_facts:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfuncci
|
||||
name: af{{ fixed_resource_prefix }}
|
||||
register: results
|
||||
|
||||
- name: assert the facts were retrieved
|
||||
assert:
|
||||
that:
|
||||
- results.ansible_facts.azure_functionapps|length == 1
|
||||
- results.ansible_facts.azure_functionapps[0].name == 'azfuncci'
|
||||
- results.ansible_facts.azure_functionapps[0].name == 'af{{ fixed_resource_prefix }}'
|
||||
|
||||
- name: delete basic function app
|
||||
azure_rm_functionapp:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfuncci
|
||||
name: af{{ fixed_resource_prefix }}
|
||||
state: absent
|
||||
register: output
|
||||
|
||||
|
@ -41,8 +45,8 @@
|
|||
- name: create a function with app settings
|
||||
azure_rm_functionapp:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfuncci
|
||||
storage_account: azfunccistor4
|
||||
name: af{{ fixed_resource_prefix }}
|
||||
storage_account: sa{{ fixed_resource_prefix }}
|
||||
app_settings:
|
||||
hello: world
|
||||
things: more stuff
|
||||
|
@ -55,8 +59,8 @@
|
|||
- name: change app settings
|
||||
azure_rm_functionapp:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfuncci
|
||||
storage_account: azfunccistor4
|
||||
name: af{{ fixed_resource_prefix }}
|
||||
storage_account: sa{{ fixed_resource_prefix }}
|
||||
app_settings:
|
||||
hello: world
|
||||
things: more stuff
|
||||
|
@ -70,7 +74,7 @@
|
|||
- name: delete the function app
|
||||
azure_rm_functionapp:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfuncci
|
||||
name: af{{ fixed_resource_prefix }}
|
||||
state: absent
|
||||
register: output
|
||||
|
||||
|
@ -81,5 +85,5 @@
|
|||
- name: delete storage account
|
||||
azure_rm_storageaccount:
|
||||
resource_group: '{{ resource_group }}'
|
||||
name: azfunccistor4
|
||||
name: sa{{ fixed_resource_prefix }}
|
||||
state: absent
|
||||
|
|
Loading…
Reference in a new issue