TPT-4284:ansible implement support for reserved ip for ipv4#788
TPT-4284:ansible implement support for reserved ip for ipv4#788mgwoj wants to merge 10 commits intolinode:devfrom
Conversation
Release v0.41.1
Release v0.42.0
Release v0.43.0
Release v0.44.0
Release v0.45.0
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Linode Reserved IPv4 addresses to the linode.cloud Ansible collection, including new modules for managing/querying reserved IPs and create-time assignment support for Instances and NodeBalancers.
Changes:
- Introduces
reserved_ip,reserved_ip_info, andreserved_ip_listmodules plus associated doc fragments and integration tests. - Adds create-only
ipv4parameters toinstanceandnodebalancerto allow assigning a reserved IPv4 at creation time. - Updates IP-related doc fragments/docs to include new Reserved IP fields and pins
linode_api4to a Git ref.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/targets/reserved_ip_basic/tasks/main.yaml | New integration test covering reserve/update-tags/delete flow |
| tests/integration/targets/reserved_ip_info/tasks/main.yaml | New integration test for querying a reserved IP by address |
| tests/integration/targets/reserved_ip_list/tasks/main.yaml | New integration test for listing reserved IPs |
| tests/integration/targets/instance_reserved_ip/tasks/main.yaml | New integration test for assigning a reserved IP on instance create |
| tests/integration/targets/nodebalancer_reserved_ip/tasks/main.yaml | New integration test for assigning a reserved IP on nodebalancer create |
| requirements.txt | Switches linode_api4 dependency to a Git URL |
| plugins/modules/reserved_ip.py | New module to create/update tags/delete reserved IPs |
| plugins/modules/reserved_ip_info.py | New info module to fetch a reserved IP by address |
| plugins/modules/reserved_ip_list.py | New list module to enumerate reserved IPs |
| plugins/modules/instance.py | Adds create-only ipv4 param and excludes it from update reconciliation |
| plugins/modules/nodebalancer.py | Adds create-only ipv4 param and excludes it from update reconciliation |
| plugins/module_utils/doc_fragments/reserved_ip.py | Doc fragment samples/examples for reserved_ip |
| plugins/module_utils/doc_fragments/reserved_ip_info.py | Doc fragment samples/examples for reserved_ip_info |
| plugins/module_utils/doc_fragments/reserved_ip_list.py | Doc fragment samples/examples for reserved_ip_list |
| plugins/module_utils/doc_fragments/instance.py | Adds instance example using reserved IPv4 |
| plugins/module_utils/doc_fragments/nodebalancer.py | Adds nodebalancer example using reserved IPv4 |
| plugins/module_utils/doc_fragments/ip.py | Updates IP sample fields |
| plugins/module_utils/doc_fragments/ip_info.py | Updates IP info sample fields |
| docs/modules/instance.md | Generated docs updated for new instance param |
| docs/modules/nodebalancer.md | Generated docs updated for new nodebalancer param |
| docs/modules/ip_info.md | Generated docs updated for new IP fields |
| docs/modules/ip_rdns.md | Generated docs updated for new IP fields |
| README.md | Adds module links for reserved_ip*, but docs appear missing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Some findings:
These are mostly for discussion, the overall changes looks great! |
📝 Description
Implements support for Linode Reserved IPv4 addresses in
ansible_linode.New modules:
reserved_ip — create, update tags, and delete reserved IP addresses
reserved_ip_info — retrieve details for a single reserved IP by address
reserved_ip_list — list and filter all reserved IPs on an account
Updated modules:
instance — new ipv4 parameter to assign a reserved IP at creation time (create-only; excluded from update path to prevent handle_updates errors)
nodebalancer — new ipv4 parameter to assign a reserved IP at creation time (create-only; excluded from create params when None and popped before handle_updates)
Other changes:
Updated ip_info and ip doc fragments with new fields: reserved, tags, interface_id, assigned_entity, vpc_nat_1_1
Added integration tests: reserved_ip_basic, reserved_ip_info, reserved_ip_list, instance_reserved_ip, nodebalancer_reserved_ip
Pinned requirements.txt to linode_api4 @ git+https://github.com/linode/linode_api4-python.git@proj/reserved-ips
Generated/updated docs via make gendocs
✔️ How to Test