New in version 2.3.
parameter | required | default | choices | comments |
---|---|---|---|---|
address | no | Specifiies an IP address to configure in CIDR notation. aliases: addr | ||
addrobj | yes | Specifies an unique IP address on the system. | ||
addrtype | no | static |
| Specifiies a type of IP address to configure. |
state | no | present |
| Create/delete/enable/disable an IP address on the network interface. |
temporary | no | Specifies that the configured IP address is temporary. Temporary IP addresses do not persist across reboots. | ||
wait | no | 60 | Specifies the time in seconds we wait for obtaining address via DHCP. |
name: Configure IP address 10.0.0.1 on e1000g0 ipadm_addr: addr=10.0.0.1/32 addrobj=e1000g0/v4 state=present name: Delete addrobj ipadm_addr: addrobj=e1000g0/v4 state=absent name: Configure link-local IPv6 address ipadm_addr: addtype=addrconf addrobj=vnic0/v6 name: Configure address via DHCP and wait 180 seconds for address obtaining ipadm_addr: addrobj=vnic0/dhcp addrtype=dhcp wait=180
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
addrtype | address type | always | string | static |
state | state of the target | always | string | present |
temporary | specifies if operation will persist across reboots | always | boolean | True |
address | IP address | only if addrtype is 'static' | string | 1.3.3.7/32 |
wait | time we wait for DHCP | only if addrtype is 'dhcp' | string | 10 |
addrobj | address object name | always | string | bge0/v4 |
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.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/ipadm_addr_module.html