mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
adding tags to keyvault (#45145)
This commit is contained in:
committed by
Yunge Zhu
parent
9c1ba18607
commit
a5e2b60870
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user