Warn about issues with (de)attaching floating ip addresses to/from servers

Change-Id: I6d3349537ad836385fc415d51009fb868b6279e0
This commit is contained in:
Jakob Meng 2023-01-16 11:48:01 +01:00
parent 39ffebea4c
commit a46bbd0d48
2 changed files with 20 additions and 8 deletions

View File

@ -8,11 +8,11 @@ DOCUMENTATION = '''
--- ---
module: floating_ip module: floating_ip
author: OpenStack Ansible SIG author: OpenStack Ansible SIG
short_description: Add/Remove floating IP from an instance short_description: Manage floating IP addresses for OpenStack servers
description: description:
- Add or Remove a floating IP to an instance. - Add or remove an floating ip address to/from an OpenStack server.
- Returns the floating IP when attaching only if I(wait=true). - Returns the floating IP when attaching only if I(wait) is C(true).
- When detaching a floating IP there might be a delay until an instance - When detaching a floating IP there might be a delay until an server
does not list the floating IP any more. does not list the floating IP any more.
options: options:
fixed_address: fixed_address:
@ -55,7 +55,7 @@ options:
default: 'no' default: 'no'
server: server:
description: description:
- The name or ID of the instance to which the IP address - The name or ID of the server to which the IP address
should be assigned. should be assigned.
required: true required: true
type: str type: str
@ -81,7 +81,7 @@ EXAMPLES = '''
cloud: dguerri cloud: dguerri
server: cattle001 server: cattle001
# Assign a new floating IP to the instance fixed ip `192.0.2.3` of # Assign a new floating IP to the server fixed ip `192.0.2.3` of
# `cattle001`. If a free floating IP is already allocated to the project, it is # `cattle001`. If a free floating IP is already allocated to the project, it is
# reused; if not, a new one is created. # reused; if not, a new one is created.
- openstack.cloud.floating_ip: - openstack.cloud.floating_ip:
@ -94,7 +94,7 @@ EXAMPLES = '''
wait: true wait: true
timeout: 180 timeout: 180
# Assign a new floating IP from the network `ext_net` to the instance fixed # Assign a new floating IP from the network `ext_net` to the server fixed
# ip in network `private_net` of `cattle001`. # ip in network `private_net` of `cattle001`.
- openstack.cloud.floating_ip: - openstack.cloud.floating_ip:
cloud: dguerri cloud: dguerri
@ -376,7 +376,7 @@ class NetworkingFloatingIPModule(OpenStackModule):
floating_ip_id=ip['id']) floating_ip_id=ip['id'])
# OpenStackSDK sets {"port_id": None} to detach a floating # OpenStackSDK sets {"port_id": None} to detach a floating
# ip from an instance, but there might be a delay until a # ip from a device, but there might be a delay until a
# server does not list it in addresses any more. # server does not list it in addresses any more.
changed = True changed = True

View File

@ -22,6 +22,10 @@ options:
attach the server to a public network. attach the server to a public network.
- Requires I(wait) to be C(True) during server creation. - Requires I(wait) to be C(True) during server creation.
- Floating IP support is unstable in this module, use with caution. - Floating IP support is unstable in this module, use with caution.
- Options I(auto_ip), I(floating_ip_pools) and I(floating_ips) interact
in non-obvious ways and undocumentable depth. For explicit and safe
attaching and detaching of floating ip addresses use module
I(openstack.cloud.resource) instead.
type: bool type: bool
default: 'yes' default: 'yes'
aliases: ['auto_floating_ip', 'public_ip'] aliases: ['auto_floating_ip', 'public_ip']
@ -91,6 +95,10 @@ options:
- Name of floating IP pool from which to choose a floating IP. - Name of floating IP pool from which to choose a floating IP.
- Requires I(wait) to be C(True) during server creation. - Requires I(wait) to be C(True) during server creation.
- Floating IP support is unstable in this module, use with caution. - Floating IP support is unstable in this module, use with caution.
- Options I(auto_ip), I(floating_ip_pools) and I(floating_ips) interact
in non-obvious ways and undocumentable depth. For explicit and safe
attaching and detaching of floating ip addresses use module
I(openstack.cloud.resource) instead.
type: list type: list
elements: str elements: str
floating_ips: floating_ips:
@ -98,6 +106,10 @@ options:
- list of valid floating IPs that pre-exist to assign to this node. - list of valid floating IPs that pre-exist to assign to this node.
- Requires I(wait) to be C(True) during server creation. - Requires I(wait) to be C(True) during server creation.
- Floating IP support is unstable in this module, use with caution. - Floating IP support is unstable in this module, use with caution.
- Options I(auto_ip), I(floating_ip_pools) and I(floating_ips) interact
in non-obvious ways and undocumentable depth. For explicit and safe
attaching and detaching of floating ip addresses use module
I(openstack.cloud.resource) instead.
type: list type: list
elements: str elements: str
image: image: