Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.infinity
.
Parameter | Choices/Defaults | Comments |
---|---|---|
action string / required |
| Action to perform |
ip_address string | Default: "" | IP Address for a reservation or a release. |
network_address string | Default: "" | Network address with CIDR format (e.g., 192.168.310.0). |
network_family string |
4 | Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack |
network_id string | Default: "" | Network ID. |
network_location integer | Default: -1 | The parent network id for a given network. |
network_name string | Default: "" | The name of a network. |
network_size string | Default: "" | Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). |
network_type string |
| Network type defined by Infinity |
password string / required | Infinity password. | |
server_ip string / required | Infinity server_ip with IP address. | |
username string / required | Username to access Infinity. The user must have REST API privileges. |
--- - hosts: localhost connection: local strategy: debug tasks: - name: Reserve network into Infinity IPAM community.general.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, 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: {'description': None, 'network_address': '192.168.10.32/28', 'network_family': '4', 'network_id': 3102, 'network_location': '3085', 'network_name': "'reserve_new_ansible_network'", 'network_size': None, 'network_type': 'lan', 'ranges': {'first_ip': None, 'id': 0, 'last_ip': None, 'name': None, 'type': None}} |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/infinity_module.html