Skip to content

Commit

Permalink
Quote scalars with colons in flow style collection (#2014) (#2017)
Browse files Browse the repository at this point in the history
[PR #2014/68fb0a31 backport][stable-7] Quote scalars with colons in flow style collection

This is a backport of PR #2014 as merged into main (68fb0a3).
SUMMARY

Older versions of libyaml and pyyaml don't support colons in scalars that appear in flow style collections. This adds quotes to the handful of cases where they are used in the integration tests.
This was uncovered by downstream testing. I am only able to reproduce the problem on the supported ee-minimal-rhel8 image. I believe this is because even though pyyaml should be recent enough, it has likely been compiled against an older version of libyaml that does not have the fix.
See:
yaml/libyaml#104
yaml/pyyaml#45
It's worth noting that running ansible-lint --fix will undo these changes, which is how I think they were made in the first place.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell
  • Loading branch information
patchback[bot] committed Mar 13, 2024
1 parent 37ee05f commit 7b16614
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/integration/targets/ec2_ami/tasks/main.yml
Expand Up @@ -708,8 +708,8 @@
tags:
Name: "{{ ec2_ami_name }}_permissions"
launch_permissions:
org_arns: [arn:aws:organizations::123456789012:organization/o-123ab4cdef]
org_unit_arns: [arn:aws:organizations::123456789012:ou/o-123example/ou-1234-5exampld]
org_arns: ["arn:aws:organizations::123456789012:organization/o-123ab4cdef"]
org_unit_arns: ["arn:aws:organizations::123456789012:ou/o-123example/ou-1234-5exampld"]
register: permissions_update_result

- name: Get ami info
Expand Down
Expand Up @@ -12,7 +12,7 @@
to_port: 8182
cidr_ipv6:
- 64:ff9b::/96
- [2620::/32]
- ["2620::/32"]
- proto: tcp
ports: 5665
cidr_ip:
Expand All @@ -38,7 +38,7 @@
to_port: 8182
cidr_ipv6:
- 64:ff9b::/96
- [2620::/32]
- ["2620::/32"]
- proto: tcp
ports: 5665
cidr_ip:
Expand Down Expand Up @@ -66,7 +66,7 @@
to_port: 8182
cidr_ipv6:
- 64:ff9b::/96
- [2620::/32]
- ["2620::/32"]
- proto: tcp
ports: 5665
cidr_ip:
Expand All @@ -92,7 +92,7 @@
to_port: 8182
cidr_ipv6:
- 64:ff9b::/96
- [2620::/32]
- ["2620::/32"]
- proto: tcp
ports: 5665
cidr_ip:
Expand All @@ -117,7 +117,7 @@
to_port: 8182
cidr_ipv6:
- 64:ff9b::/96
- [2620::/32]
- ["2620::/32"]
- proto: tcp
ports: 5665
cidr_ip:
Expand All @@ -142,7 +142,7 @@
to_port: 8182
cidr_ipv6:
- 64:ff9b::/96
- [2620::/32]
- ["2620::/32"]
- proto: tcp
ports: 5665
cidr_ip:
Expand All @@ -167,7 +167,7 @@
from_port: 8182
to_port: 8182
cidr_ipv6:
- [2620::/32, 64:ff9b::/96]
- ["2620::/32", "64:ff9b::/96"]
- proto: tcp
ports: 5665
cidr_ip:
Expand All @@ -190,8 +190,8 @@
from_port: 8182
to_port: 8182
cidr_ipv6:
- [2620::/32, 64:ff9b::/96]
- [2001:DB8:A0B:12F0::1/64]
- ["2620::/32", "64:ff9b::/96"]
- ["2001:DB8:A0B:12F0::1/64"]
- proto: tcp
ports: 5665
cidr_ip:
Expand Down

0 comments on commit 7b16614

Please sign in to comment.