summaryrefslogtreecommitdiff
path: root/test/integration/targets/azure_rm_functionapp/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/azure_rm_functionapp/tasks/main.yml')
-rw-r--r--test/integration/targets/azure_rm_functionapp/tasks/main.yml28
1 files changed, 16 insertions, 12 deletions
diff --git a/test/integration/targets/azure_rm_functionapp/tasks/main.yml b/test/integration/targets/azure_rm_functionapp/tasks/main.yml
index c1b9388bbd..35cd102741 100644
--- a/test/integration/targets/azure_rm_functionapp/tasks/main.yml
+++ b/test/integration/targets/azure_rm_functionapp/tasks/main.yml
@@ -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