1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-07-01 16:18:55 +00:00

adding tags to keyvault (#45145)

This commit is contained in:
Zim Kalinowski 2018-09-05 16:21:15 +08:00 committed by Yunge Zhu
parent 9c1ba18607
commit a5e2b60870
2 changed files with 28 additions and 3 deletions

View file

@ -64,7 +64,7 @@
that:
- output.changed == false
- name: Update existing Key Vault (add a rule)
- name: Update existing Key Vault (add a rule and tags)
azure_rm_keyvault:
resource_group: "{{ resource_group }}"
vault_name: "vault{{ rpfx }}"
@ -82,12 +82,27 @@
keys:
- get
- list
tags:
aaa: bbb
register: output
- name: Assert the state has changed
assert:
that:
- output.changed == true
- name: Use REST API to retrieve keyvault (as facts not available yet)
azure_rm_resource_facts:
api_version: '2018-02-14'
resource_group: "{{ resource_group }}"
provider: keyvault
resource_type: vaults
resource_name: "vault{{ rpfx }}"
register: output
- name: Assert the facts are properly set
assert:
that:
- output.response[0].tags.aaa == "bbb"
- name: Delete instance of Key Vault -- check mode
azure_rm_keyvault:
resource_group: "{{ resource_group }}"