New in version 2.4.
parameter | required | default | choices | comments |
---|---|---|---|---|
action |
yes |
|
Action to perform
|
|
ip_address |
no |
IP Address for a reservation or a release
|
||
network_address |
no |
Network address with CIDR format (e.g., 192.168.310.0)
|
||
network_family |
no | 4 |
|
Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack
|
network_id |
no |
Network ID
|
||
network_location |
no | -1 |
the parent network id for a given network
|
|
network_name |
no |
The name of a network
|
||
network_size |
no |
Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26)
|
||
network_type |
no | lan |
|
Network type defined by Infinity
|
password |
yes |
Infinity password
|
||
server_ip |
yes |
Infinity server_ip with IP address
|
||
username |
yes |
Username to access Infinity
The user must have Rest API privileges
|
--- - hosts: localhost connection: local strategy: debug tasks: - name: Reserve network into Infinity IPAM infinity: server_ip: "80.75.107.12" username: "username" password: "password" action: "reserve_network" network_name: "reserve_new_ansible_network" network_family: "4" network_type: 'lan' network_id: "1201" network_size: "/28" register: infinity
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
ip_info |
when reserve next available ip address from a network, the ip address info ) is returned.
|
success | string | {"address": "192.168.10.3", "hostname": "", "FQDN": "", "domainname": "", "id": 3229} |
network_id |
id for a given network
|
success | string | 1501 |
network_info |
when reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned.
|
success | string | {'network_size': None, 'network_location': '3085', 'description': None, 'network_family': '4', 'network_id': 3102, 'network_address': '192.168.10.32/28', 'ranges': {'last_ip': None, 'type': None, 'id': 0, 'first_ip': None, 'name': None}, 'network_name': "'reserve_new_ansible_network'", 'network_type': 'lan'} |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.