mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
feat(inventory): add variable for ipv6 address (#188)
This variable matches the `ansible_host` variable that we set when `connect_with: public_ipv6`, and allows the user to dynamically choose the connection method in `compose`.
This commit is contained in:
parent
bfe0f7a575
commit
1863fe512c
2 changed files with 3 additions and 0 deletions
|
|
@ -225,6 +225,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||
if server.public_net.ipv6:
|
||||
self.inventory.set_variable(server.name, "ipv6_network", to_native(server.public_net.ipv6.network))
|
||||
self.inventory.set_variable(server.name, "ipv6_network_mask", to_native(server.public_net.ipv6.network_mask))
|
||||
self.inventory.set_variable(server.name, "ipv6", to_native(self._first_ipv6_address(server.public_net.ipv6.ip)))
|
||||
|
||||
self.inventory.set_variable(
|
||||
server.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue