2c60771096
* introducing azure_rm_resource * adding missing file * fixed documentation * fixed subresource * don't support tags (yet) * added api_version to the doc * adding api version to the doc * ignoring some doc checks * fixing imports * final sanity fixes * adding idempotency * fixed params * missing query parameter * some updates of azure_rm_resource * try to update test for idempotency * fixed test * try to fix problem temporarily * another approach * fixed spelling * fixed mistake * refactored a bit * fixes * removed unnecessary code * removed assert temporarily * fixed documentation * trying to fix import issues * trying to fix import * try to fix sanity * removed unnecessary pass * removed e324 ignores * resolve conflicts in ignore.txt * fixing ignore txt * revert * try different approach to idempotency * updating tests * fixed task * fixes * getting output value properly * fix test * missing change * fixed bug, changed test * fixed mistake * fixed mistake
77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
- name: Prepare random number
|
|
set_fact:
|
|
rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
|
run_once: yes
|
|
|
|
- name: Call REST API - StorageAccounts_Create
|
|
azure_rm_resource:
|
|
api_version: '2017-10-01'
|
|
resource_group: "{{ resource_group }}"
|
|
provider: storage
|
|
resource_type: storageaccounts
|
|
resource_name: stacc{{ rpfx }}
|
|
body:
|
|
sku:
|
|
name: Standard_LRS
|
|
kind: BlobStorage
|
|
location: eastus
|
|
properties:
|
|
accessTier: Hot
|
|
idempotency: yes
|
|
register: output
|
|
|
|
- name: Assert that something has changed
|
|
assert:
|
|
that: output.changed
|
|
|
|
- name: Call REST API - StorageAccounts_Create - with same parameters
|
|
azure_rm_resource:
|
|
api_version: '2017-10-01'
|
|
resource_group: "{{ resource_group }}"
|
|
provider: storage
|
|
resource_type: storageaccounts
|
|
resource_name: stacc{{ rpfx }}
|
|
body:
|
|
sku:
|
|
name: Standard_LRS
|
|
kind: BlobStorage
|
|
location: eastus
|
|
properties:
|
|
accessTier: Hot
|
|
idempotency: yes
|
|
register: output
|
|
|
|
- name: Assert that nothing has changed
|
|
assert:
|
|
that: not output.changed
|
|
|
|
- name: Call REST API - StorageAccounts_Create - with different parameters
|
|
azure_rm_resource:
|
|
api_version: '2017-10-01'
|
|
resource_group: "{{ resource_group }}"
|
|
provider: storage
|
|
resource_type: storageaccounts
|
|
resource_name: stacc{{ rpfx }}
|
|
body:
|
|
sku:
|
|
name: Standard_LRS
|
|
kind: BlobStorage
|
|
location: eastus
|
|
properties:
|
|
accessTier: Cool
|
|
idempotency: yes
|
|
register: output
|
|
|
|
- name: Assert that something has changed
|
|
assert:
|
|
that: output.changed
|
|
|
|
|
|
- name: Try to get information about account
|
|
azure_rm_resource_facts:
|
|
api_version: '2017-10-01'
|
|
resource_group: "{{ resource_group }}"
|
|
provider: storage
|
|
resource_type: storageaccounts
|
|
resource_name: stacc{{ rpfx }}
|
|
register: output
|