community.general.infinity module – Manage Infinity IPAM using Rest API
Note
This module is part of the community.general collection (version 10.7.5).
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.
Synopsis
- Manage Infinity IPAM using REST API. 
Parameters
| Parameter | Comments | 
|---|---|
| Action to perform. Choices: 
 | |
| IP Address for a reservation or a release. | |
| Network address with CIDR format (for example  | |
| Network family defined by Infinity, for example  Choices: 
 | |
| Network ID. | |
| The parent network ID for a given network. Default:  | |
| The name of a network. | |
| Network bitmask (for example  | |
| Network type defined by Infinity. Choices: 
 | |
| Infinity password. | |
| Infinity server_ip with IP address. | |
| Username to access Infinity. The user must have REST API privileges. | 
Attributes
| Attribute | Support | Description | 
|---|---|---|
| Support: none | Can run in  | |
| Support: none | Will return details on what has changed (or possibly needs changing in  | 
Examples
- 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
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| When reserve next available IP address from a network, the IP address info is returned. Please note that the value is a string containing JSON data. Returned: success Sample:  | |
| ID for a given network. Returned: success Sample:  | |
| When reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned. Please note that the value is a string containing JSON data. Returned: success Sample:  | 
