-
Notifications
You must be signed in to change notification settings - Fork 397
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
Refactor ec2_vpc_peer* modules #2153
Refactor ec2_vpc_peer* modules #2153
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
3b8bd11
to
d954ee2
Compare
This change depends on a change that failed to merge. Change ansible-collections/amazon.aws#2303 is needed. |
d954ee2
to
8c2ee6b
Compare
This change depends on a change that failed to merge. Change ansible-collections/amazon.aws#2303 is needed. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 23s (non-voting) |
Signed-off-by: Alina Buzachis <[email protected]>
0e76c5e
to
7f67600
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 29s (non-voting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor remarks
Signed-off-by: Alina Buzachis <[email protected]>
This change depends on a change that failed to merge. Change ansible-collections/amazon.aws#2303 is needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add support for check_mode
for the ec2_vpc_peer
module (the module is using the ensure_ec2_tags
API which natively support the check mode).
Signed-off-by: Alina Buzachis <[email protected]>
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 43s (non-voting) |
recheck |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 55s (non-voting) |
recheck |
1 similar comment
recheck |
Signed-off-by: Alina Buzachis <[email protected]>
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 50s (non-voting) |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 22s (non-voting) |
plugins/modules/ec2_vpc_peer.py
Outdated
"status-code": state, | ||
} | ||
try: | ||
waiter.wait(Filters=ansible_dict_to_boto3_filter_list(peer_filter)) | ||
waiter.wait(Filters=ansible_dict_to_boto3_filter_list(filters)) | ||
except botocore.exceptions.WaiterError as e: | ||
module.fail_json_aws(e, "Failed to wait for state change") | ||
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: | ||
module.fail_json_aws(e, "Enable to describe Peerig Connection while waiting for state to change") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the message be "Unable to describe Peerig Connection while waiting for state to change" ?
register: peers_info | ||
check_mode: True | ||
|
||
- name: Assert success | ||
assert: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert: | |
ansible.builtin.assert: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add FQCN for all assert tasks ?
plugins/modules/ec2_vpc_peer.py
Outdated
peering_connections = describe_vpc_peering_connections( | ||
client, Filters=ansible_dict_to_boto3_filter_list(filters) | ||
) | ||
except AnsibleEC2Error as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't a.aws' ec2 module_utils manage this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the errors need to be handled here.
Signed-off-by: Alina Buzachis <[email protected]>
12006f5
to
c01f5f0
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 46s (non-voting) |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 24s (non-voting) |
Signed-off-by: Alina Buzachis <[email protected]>
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 15s (non-voting) |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 3m 44s (non-voting) |
fcd780e
into
ansible-collections:main
SUMMARY
Depends-On: ansible-collections/amazon.aws#2303
Refactor ec2_vpc_peer* modules
Once the module is migrated to amazon.aws I will deprecate
result
returned by the info module and rename the ec2_vpc_peer module (see #2154).ISSUE TYPE
COMPONENT NAME
ec2_vpc_peer
ec2_vpc_peering_info
ADDITIONAL INFORMATION