community.network.ipadm_ifprop – Manage IP interface properties on Solaris/illumos systems.

Note

This plugin is part of the community.network collection (version 3.0.0).

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.network.

To use it in a playbook, specify: community.network.ipadm_ifprop.

Synopsis

  • Modify IP interface properties on Solaris/illumos systems.

Parameters

Parameter

Comments

interface

aliases: nic

string / required

Specifies the IP interface we want to manage.

property

aliases: name

string / required

Specifies the name of the property we want to manage.

protocol

string / required

Specifies the protocol for which we want to manage properties.

state

string

Set or reset the property value.

Choices:

  • present ← (default)

  • absent

  • reset

temporary

boolean

Specifies that the property value is temporary. Temporary property values do not persist across reboots.

Choices:

  • no ← (default)

  • yes

value

string

Specifies the value we want to set for the property.

Examples

- name: Allow forwarding of IPv4 packets on network interface e1000g0
  community.network.ipadm_ifprop: protocol=ipv4 property=forwarding value=on interface=e1000g0

- name: Temporarily reset IPv4 forwarding property on network interface e1000g0
  community.network.ipadm_ifprop: protocol=ipv4 interface=e1000g0  temporary=true property=forwarding state=reset

- name: Configure IPv6 metric on network interface e1000g0
  community.network.ipadm_ifprop: protocol=ipv6 nic=e1000g0 name=metric value=100

- name: Set IPv6 MTU on network interface bge0
  community.network.ipadm_ifprop: interface=bge0 name=mtu value=1280 protocol=ipv6

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

interface

string

interface name we want to set property on

Returned: always

Sample: “e1000g0”

property

string

property’s name

Returned: always

Sample: “mtu”

protocol

string

property’s protocol

Returned: always

Sample: “ipv4”

state

string

state of the target

Returned: always

Sample: “present”

value

string

property’s value

Returned: when value is provided

Sample: 1280

Authors

  • Adam Števko (@xen0l)