infinity - manage Infinity IPAM using Rest API¶
New in version 2.4.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
action
required |
|
Action to perform
|
ip_address |
Default: |
IP Address for a reservation or a release
|
network_address |
Default: |
Network address with CIDR format (e.g., 192.168.310.0)
|
network_family |
4
|
Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack
|
network_id |
Default: |
Network ID
|
network_location |
Default: -1
|
the parent network id for a given network
|
network_name |
Default: |
The name of a network
|
network_size |
Default: |
Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26)
|
network_type |
|
Network type defined by Infinity
|
password
required |
Infinity password
|
|
server_ip
required |
Infinity server_ip with IP address
|
|
username
required |
Username to access Infinity
The user must have Rest API privileges
|
Examples¶
---
- 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
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
ip_info
string
|
success |
when reserve next available ip address from a network, the ip address info ) is returned.
Sample:
{"address": "192.168.10.3", "hostname": "", "FQDN": "", "domainname": "", "id": 3229}
|
network_id
string
|
success |
id for a given network
Sample:
1501
|
network_info
string
|
success |
when reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned.
Sample:
{'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'}
|
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- Meirong Liu
Hint
If you notice any issues in this documentation you can edit this document to improve it.