community.general.ipadm_ifprop (0.1.1) — module

Manage IP interface properties on Solaris/illumos systems.

Authors: Adam Števko (@xen0l)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Modify IP interface properties on Solaris/illumos systems.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Allow forwarding of IPv4 packets on network interface e1000g0
  ipadm_ifprop: protocol=ipv4 property=forwarding value=on interface=e1000g0
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Temporarily reset IPv4 forwarding property on network interface e1000g0
  ipadm_ifprop: protocol=ipv4 interface=e1000g0  temporary=true property=forwarding state=reset
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure IPv6 metric on network interface e1000g0
  ipadm_ifprop: protocol=ipv6 nic=e1000g0 name=metric value=100
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set IPv6 MTU on network interface bge0
  ipadm_ifprop: interface=bge0 name=mtu value=1280 protocol=ipv6

Inputs

    
state:
    choices:
    - present
    - absent
    - reset
    default: present
    description:
    - Set or reset the property value.
    required: false

value:
    description:
    - Specifies the value we want to set for the property.
    required: false

property:
    aliases:
    - name
    description:
    - Specifies the name of the property we want to manage.
    required: true

protocol:
    description:
    - Specifies the protocol for which we want to manage properties.
    required: true

interface:
    aliases:
    - nic
    description:
    - Specifies the IP interface we want to manage.
    required: true

temporary:
    default: false
    description:
    - Specifies that the property value is temporary. Temporary property values do not
      persist across reboots.
    required: false
    type: bool

Outputs

interface:
  description: interface name we want to set property on
  returned: always
  sample: e1000g0
  type: str
property:
  description: property's name
  returned: always
  sample: mtu
  type: str
protocol:
  description: property's protocol
  returned: always
  sample: ipv4
  type: str
state:
  description: state of the target
  returned: always
  sample: present
  type: str
value:
  description: property's value
  returned: when value is provided
  sample: 1280
  type: str