Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2_group - fix VPC precedence for security group targets #45787

Merged
merged 1 commit into from
Sep 18, 2018

Conversation

s-hertel
Copy link
Contributor

SUMMARY

Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes #45782

This should be backported to 2.6 and 2.7.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_group

ANSIBLE VERSION
ansible 2.8.0.dev0

Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes ansible#45782
@ansibot
Copy link
Contributor

ansibot commented Sep 18, 2018

cc @adq
click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Sep 18, 2018

Hi @s-hertel,

Thank you for the pullrequest, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 18, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Sep 18, 2018
@@ -855,6 +855,9 @@ def group_exists(client, module, vpc_id, group_id, name):
if security_groups:
groups = dict((group['GroupId'], group) for group in all_groups)
groups.update(dict((group['GroupName'], group) for group in all_groups))
if vpc_id:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VPC is used to filter above - but it doesn't only return results matching the VPC, it returns matches that meet at least one of the filters.

@ryansb ryansb merged commit 8d2df9b into ansible:devel Sep 18, 2018
s-hertel added a commit to s-hertel/ansible that referenced this pull request Sep 18, 2018
)

Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes ansible#45782
(cherry picked from commit 8d2df9b)
s-hertel added a commit to s-hertel/ansible that referenced this pull request Sep 18, 2018
)

Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes ansible#45782
(cherry picked from commit 8d2df9b)
mattclay pushed a commit that referenced this pull request Sep 25, 2018
Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes #45782
(cherry picked from commit 8d2df9b)
abadger pushed a commit that referenced this pull request Oct 9, 2018
…) (#45815)

* ec2_group - fix VPC precedence for security group targets (#45787)

Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes #45782
(cherry picked from commit 8d2df9b)

* Fix ec2_group for EC2-Classic accounts (#46242)

* Fix ec2_group for EC2-Classic accounts

* changelog

(cherry picked from commit 9efc3dc)

* Merge changelogs
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2_group no longer "prefers" names in the same VPC
3 participants