ansible / ansible.builtin / v2.9.27 / module / ipadm_addr Manage IP addresses on an interface on Solaris/illumos systems | "added in version" 2.3 of ansible.builtin" Authors: Adam Števko (@xen0l) preview | supported by communityansible.builtin.ipadm_addr (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Create/delete static/dynamic IP addresses on network interfaces on Solaris/illumos systems.
Up/down static/dynamic IP addresses on network interfaces on Solaris/illumos systems.
Manage IPv6 link-local addresses on network interfaces on Solaris/illumos systems.
- 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
wait: default: 60 description: - Specifies the time in seconds we wait for obtaining address via DHCP. required: false state: choices: - absent - present - up - down - enabled - disabled - refreshed default: present description: - Create/delete/enable/disable an IP address on the network interface. required: false address: aliases: - addr description: - Specifiies an IP address to configure in CIDR notation. required: false addrobj: description: - Specifies an unique IP address on the system. required: true addrtype: choices: - static - dhcp - addrconf default: static description: - Specifiies a type of IP address to configure. required: false temporary: default: false description: - Specifies that the configured IP address is temporary. Temporary IP addresses do not persist across reboots. required: false type: bool
address: description: IP address returned: only if addrtype is 'static' sample: 1.3.3.7/32 type: str addrobj: description: address object name returned: always sample: bge0/v4 type: str addrtype: description: address type returned: always sample: static type: str state: description: state of the target returned: always sample: present type: str temporary: description: specifies if operation will persist across reboots returned: always sample: true type: bool wait: description: time we wait for DHCP returned: only if addrtype is 'dhcp' sample: 10 type: str