mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Fix ec2_vpc_net tags (#34725)
* Fix ec2_vpc_net tags PR #33105 broke the tags returned by ec2_vpc_net - it was returning the raw boto3 list instead of a dict as expected. * Add a test for tags
This commit is contained in:
parent
bf69f987f9
commit
240024ea4a
2 changed files with 25 additions and 1 deletions
|
@ -250,6 +250,28 @@
|
|||
|
||||
# ============================================================
|
||||
|
||||
- name: modify tags
|
||||
ec2_vpc_net:
|
||||
cidr_block: 20.0.0.0/24
|
||||
name: "{{ resource_prefix }}"
|
||||
dns_support: True
|
||||
dns_hostnames: True
|
||||
state: present
|
||||
multi_ok: no
|
||||
tags:
|
||||
Ansible: Test
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- name: assert the VPC has Name and Ansible tags
|
||||
assert:
|
||||
that:
|
||||
- result.vpc.tags|length == 2
|
||||
- 'result.vpc.tags.Ansible == "Test"'
|
||||
- 'result.vpc.tags.Name == "{{ resource_prefix }}"'
|
||||
|
||||
# ============================================================
|
||||
|
||||
- name: test check mode to delete a VPC
|
||||
ec2_vpc_net:
|
||||
cidr_block: 20.0.0.0/24
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue