??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
σ
ΰUdac @` s d d l m Z m Z m Z e Z d Z d Z d Z d d l m
Z
d d l m Z d d l
m Z d d l m Z d e
f d
YZ d S( i ( t absolute_importt divisiont print_functions
---
lookup: nios_next_ip
version_added: "2.5"
short_description: Return the next available IP address for a network
description:
- Uses the Infoblox WAPI API to return the next available IP addresses
for a given network CIDR
requirements:
- infoblox-client
extends_documentation_fragment: nios
options:
_terms:
description: The CIDR network to retrieve the next addresses from
required: True
num:
description: The number of IP addresses to return
required: false
default: 1
exclude:
version_added: "2.7"
description: List of IP's that need to be excluded from returned IP addresses
required: false
s
- name: return next available IP address for network 192.168.10.0/24
set_fact:
ipaddr: "{{ lookup('nios_next_ip', '192.168.10.0/24', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 3 available IP addresses for network 192.168.10.0/24
set_fact:
ipaddr: "{{ lookup('nios_next_ip', '192.168.10.0/24', num=3, provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 3 available IP addresses for network 192.168.10.0/24 excluding ip addresses - ['192.168.10.1', '192.168.10.2']
set_fact:
ipaddr: "{{ lookup('nios_next_ip', '192.168.10.0/24', num=3, exclude=['192.168.10.1', '192.168.10.2'],
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
se
_list:
description:
- The list of next IP addresses available
returned: always
type: list
( t
LookupBase( t
WapiLookup( t to_text( t AnsibleErrort LookupModulec B` s e Z d d Z RS( c
K` s y | d } Wn t k
r- t d n X| j d i } t | } | j d i | d 6 } | d k r t d | n | j d d } | j d g } y@ | d d }
| j d
|
i | d 6| d 6 } | d g SWn% t k
r} t t | n Xd S( Ni s) missing argument in the form of A.B.C.D/Et providert networks unable to find network object %st numi t excludet _reft next_available_ipt ips(
t
IndexErrorR t popR t
get_objectt Nonet gett call_funct ExceptionR (
t selft termst variablest kwargsR R t wapit network_objR
t
exclude_ipt reft avail_ipst exc( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/nios_next_ip.pyt runO s"
#N( t __name__t
__module__R R ( ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/nios_next_ip.pyR M s N( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNt ansible.plugins.lookupR t' ansible.module_utils.net_tools.nios.apiR t ansible.module_utils._textR t ansible.errorsR R ( ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/nios_next_ip.pyt s