@ -90,16 +90,12 @@ options:
Eg : nics : " net-id=uuid-1,net-id=uuid-2 " '
required : false
default : None
public _ip:
auto _ip:
description :
- Ensure instance has public ip however the cloud wants to do that
required : false
default : ' yes '
auto_floating_ip :
description :
- If the module should automatically assign a floating IP
required : false
default : ' yes '
aliases : [ ' auto_floating_ip ' , ' public_ip ' ]
floating_ips :
decription :
- list of valid floating IPs that pre - exist to assign to this node
@ -198,7 +194,7 @@ EXAMPLES = '''
timeout : 200
flavor : 101
security_groups : default
auto_ floating_ ip: yes
auto_ ip: yes
# Creates a new instance in named cloud mordred availability zone az2
# and assigns a pre-known floating IP
@ -379,7 +375,7 @@ def _create_server(module, cloud):
server = cloud . create_server (
ip_pool = module . params [ ' floating_ip_pools ' ] ,
ips = module . params [ ' floating_ips ' ] ,
auto_ip = module . params [ ' auto_ floating_ ip' ] ,
auto_ip = module . params [ ' auto_ ip' ] ,
root_volume = module . params [ ' root_volume ' ] ,
terminate_volume = module . params [ ' terminate_volume ' ] ,
wait = module . params [ ' wait ' ] , timeout = module . params [ ' timeout ' ] ,
@ -398,18 +394,18 @@ def _delete_floating_ip_list(cloud, server, extra_ips):
def _check_floating_ips ( module , cloud , server ) :
changed = False
auto_ floating_ ip = module . params [ ' auto _floating _ip' ]
auto_ ip = module . params [ ' auto _ip' ]
floating_ips = module . params [ ' floating_ips ' ]
floating_ip_pools = module . params [ ' floating_ip_pools ' ]
if floating_ip_pools or floating_ips or auto_ floating_ ip:
if floating_ip_pools or floating_ips or auto_ ip:
ips = openstack_find_nova_addresses ( server . addresses , ' floating ' )
if not ips :
# If we're configured to have a floating but we don't have one,
# let's add one
server = cloud . add_ips_to_server (
server ,
auto_ip = auto_ floating_ ip,
auto_ip = auto_ ip,
ips = floating_ips ,
ip_pool = floating_ip_pools ,
)
@ -466,7 +462,7 @@ def main():
meta = dict ( default = None ) ,
userdata = dict ( default = None ) ,
config_drive = dict ( default = False , type = ' bool ' ) ,
auto_ floating_ ip = dict ( default = True , type = ' bool ' ) ,
auto_ ip = dict ( default = True , type = ' bool ' , aliases = [ ' auto_floating_ip ' , ' public_ip ' ] ) ,
floating_ips = dict ( default = None ) ,
floating_ip_pools = dict ( default = None ) ,
root_volume = dict ( default = None ) ,
@ -475,8 +471,8 @@ def main():
)
module_kwargs = openstack_module_kwargs (
mutually_exclusive = [
[ ' auto_ floating_ ip' , ' floating_ips ' ] ,
[ ' auto_ floating_ ip' , ' floating_ip_pools ' ] ,
[ ' auto_ ip' , ' floating_ips ' ] ,
[ ' auto_ ip' , ' floating_ip_pools ' ] ,
[ ' floating_ips ' , ' floating_ip_pools ' ] ,
[ ' flavor ' , ' flavor_ram ' ] ,
[ ' image ' , ' root_volume ' ] ,