using lighter resource (#41223)
This commit is contained in:
parent
a73585552f
commit
bc690df11e
1 changed files with 23 additions and 35 deletions
|
@ -1,22 +1,17 @@
|
|||
- name: Prepare random number
|
||||
set_fact:
|
||||
rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||
nsgname: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||
run_once: yes
|
||||
|
||||
- name: Call REST API - StorageAccounts_Create
|
||||
- name: Call REST API
|
||||
azure_rm_resource:
|
||||
api_version: '2017-10-01'
|
||||
api_version: '2018-02-01'
|
||||
resource_group: "{{ resource_group }}"
|
||||
provider: storage
|
||||
resource_type: storageaccounts
|
||||
resource_name: stacc{{ rpfx }}
|
||||
provider: network
|
||||
resource_type: networksecuritygroups
|
||||
resource_name: "{{ nsgname }}"
|
||||
body:
|
||||
sku:
|
||||
name: Standard_LRS
|
||||
kind: BlobStorage
|
||||
location: eastus
|
||||
properties:
|
||||
accessTier: Hot
|
||||
idempotency: yes
|
||||
register: output
|
||||
|
||||
|
@ -24,20 +19,15 @@
|
|||
assert:
|
||||
that: output.changed
|
||||
|
||||
- name: Call REST API - StorageAccounts_Create - with same parameters
|
||||
- name: Call REST API
|
||||
azure_rm_resource:
|
||||
api_version: '2017-10-01'
|
||||
api_version: '2018-02-01'
|
||||
resource_group: "{{ resource_group }}"
|
||||
provider: storage
|
||||
resource_type: storageaccounts
|
||||
resource_name: stacc{{ rpfx }}
|
||||
provider: network
|
||||
resource_type: networksecuritygroups
|
||||
resource_name: "{{ nsgname }}"
|
||||
body:
|
||||
sku:
|
||||
name: Standard_LRS
|
||||
kind: BlobStorage
|
||||
location: eastus
|
||||
properties:
|
||||
accessTier: Hot
|
||||
idempotency: yes
|
||||
register: output
|
||||
|
||||
|
@ -45,20 +35,18 @@
|
|||
assert:
|
||||
that: not output.changed
|
||||
|
||||
- name: Call REST API - StorageAccounts_Create - with different parameters
|
||||
- name: Call REST API
|
||||
azure_rm_resource:
|
||||
api_version: '2017-10-01'
|
||||
api_version: '2018-02-01'
|
||||
resource_group: "{{ resource_group }}"
|
||||
provider: storage
|
||||
resource_type: storageaccounts
|
||||
resource_name: stacc{{ rpfx }}
|
||||
provider: network
|
||||
resource_type: networksecuritygroups
|
||||
resource_name: "{{ nsgname }}"
|
||||
body:
|
||||
sku:
|
||||
name: Standard_LRS
|
||||
kind: BlobStorage
|
||||
location: eastus
|
||||
properties:
|
||||
accessTier: Cool
|
||||
tags:
|
||||
a: "abc"
|
||||
b: "cde"
|
||||
idempotency: yes
|
||||
register: output
|
||||
|
||||
|
@ -69,9 +57,9 @@
|
|||
|
||||
- name: Try to get information about account
|
||||
azure_rm_resource_facts:
|
||||
api_version: '2017-10-01'
|
||||
api_version: '2018-02-01'
|
||||
resource_group: "{{ resource_group }}"
|
||||
provider: storage
|
||||
resource_type: storageaccounts
|
||||
resource_name: stacc{{ rpfx }}
|
||||
provider: network
|
||||
resource_type: networksecuritygroups
|
||||
resource_name: "{{ nsgname }}"
|
||||
register: output
|
||||
|
|
Loading…
Reference in a new issue