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

Add an action_group to default vars for every module #281

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

dmsimard
Copy link
Contributor

@dmsimard dmsimard commented Aug 8, 2022

SUMMARY

Add an action_group to default vars for every module

This allows, for example, to default the value of oauth_token once
without needing to specify it in every task unless it needs to be
overridden.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

meta/runtime.yml

ADDITIONAL INFORMATION

Inspired by azure.azcollection's recent fix: ansible-collections/azure#874

Edit: it looks like this for the example in the README:

Screenshot from 2022-08-17 23-26-56

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #281 (975a224) into main (a5eeeeb) will decrease coverage by 37.05%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #281       +/-   ##
===========================================
- Coverage   68.24%   31.19%   -37.06%     
===========================================
  Files          45       45               
  Lines        3549     3549               
  Branches      752      752               
===========================================
- Hits         2422     1107     -1315     
- Misses        801     2423     +1622     
+ Partials      326       19      -307     
Flag Coverage Δ
integration ?
sanity 26.48% <ø> (ø)
units 64.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugins/modules/digital_ocean_project.py 19.62% <0.00%> (-64.49%) ⬇️
plugins/modules/digital_ocean_droplet.py 10.33% <0.00%> (-58.36%) ⬇️
...lugins/modules/digital_ocean_domain_record_info.py 27.84% <0.00%> (-54.44%) ⬇️
plugins/modules/digital_ocean_database.py 16.21% <0.00%> (-52.03%) ⬇️
plugins/modules/digital_ocean_load_balancer.py 15.43% <0.00%> (-51.68%) ⬇️
plugins/modules/digital_ocean_snapshot.py 24.39% <0.00%> (-51.22%) ⬇️
plugins/modules/digital_ocean_spaces.py 25.67% <0.00%> (-48.65%) ⬇️
plugins/modules/digital_ocean_snapshot_info.py 40.00% <0.00%> (-47.50%) ⬇️
plugins/modules/digital_ocean_floating_ip.py 20.11% <0.00%> (-46.93%) ⬇️
plugins/modules/digital_ocean_cdn_endpoints.py 24.69% <0.00%> (-46.92%) ⬇️
... and 32 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dmsimard
Copy link
Contributor Author

The failure doesn't appear to be related to the patch at first glance:
Screenshot from 2022-08-17 23-16-16

I've clicked the button to re-run the integration test job because it's been a while and would be interested in a recent result.

@mamercad
Copy link
Collaborator

Yep, I'm aware that there are integration failures with the CDN stuff ... just need cycles to dig into them.

@mamercad
Copy link
Collaborator

I think all this needs at this point is a changelog fragment ...

Copy link
Collaborator

@mamercad mamercad left a comment

Choose a reason for hiding this comment

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

Changelog fragment please!

@dmsimard
Copy link
Contributor Author

dmsimard commented Aug 19, 2022

I'll provide a fragment, are you otherwise OK with the name ?

I also wonder what's the best way to keep an updated list of modules here as they are added and removed from the collection.

I came up with this list with a bit of bash-fu but I wonder if there is a better way :p

This allows, for example, to default the value of oauth_token once
without needing to specify it in every task unless it needs to be
overridden.
@dmsimard
Copy link
Contributor Author

Changelog fragment please!

Done !

@mamercad
Copy link
Collaborator

I'll provide a fragment, are you otherwise OK with the name ?

I also wonder what's the best way to keep an updated list of modules here as they are added and removed from the collection.

I came up with this list with a bit of bash-fu but I wonder if there is a better way :p

Hehe, I have nothing beyond this:

❯ grep 'module:' plugins/modules/*.py | awk '{print $2}' | sort | uniq
digital_ocean
digital_ocean_account_info
digital_ocean_balance_info
digital_ocean_block_storage
digital_ocean_cdn_endpoints
digital_ocean_cdn_endpoints_info
digital_ocean_certificate
digital_ocean_certificate_info
digital_ocean_database
digital_ocean_database_info
digital_ocean_domain
digital_ocean_domain_info
digital_ocean_domain_record
digital_ocean_domain_record_info
digital_ocean_droplet
digital_ocean_droplet_info
digital_ocean_firewall
digital_ocean_firewall_info
digital_ocean_floating_ip
digital_ocean_floating_ip_info
digital_ocean_image_info
digital_ocean_kubernetes
digital_ocean_kubernetes_info
digital_ocean_load_balancer
digital_ocean_load_balancer_info
digital_ocean_monitoring_alerts
digital_ocean_monitoring_alerts_info
digital_ocean_project
digital_ocean_project_info
digital_ocean_region_info
digital_ocean_size_info
digital_ocean_snapshot
digital_ocean_snapshot_info
digital_ocean_spaces
digital_ocean_spaces_info
digital_ocean_sshkey
digital_ocean_sshkey_info
digital_ocean_tag
digital_ocean_tag_info
digital_ocean_volume_info
digital_ocean_vpc
digital_ocean_vpc_info

@mamercad
Copy link
Collaborator

This is a slick feature by the way, thanks for sharing!

Copy link
Collaborator

@mamercad mamercad left a comment

Choose a reason for hiding this comment

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

🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants