community.general.nictagadm module – Manage nic tags on SmartOS systems

Note

This module is part of the community.general collection (version 9.5.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.general.

To use it in a playbook, specify: community.general.nictagadm.

Synopsis

  • Create or delete nic tags on SmartOS systems.

Parameters

Parameter

Comments

etherstub

boolean

Specifies that the nic tag will be attached to a created etherstub.

Parameter etherstub is mutually exclusive with both mtu, and mac.

Choices:

  • false ← (default)

  • true

force

boolean

When state=absent this switch will use the -f parameter and delete the nic tag regardless of existing VMs.

Choices:

  • false ← (default)

  • true

mac

string

Specifies the mac address to attach the nic tag to when not creating an etherstub.

Parameters mac and etherstub are mutually exclusive.

mtu

integer

Specifies the size of the mtu of the desired nic tag.

Parameters mtu and etherstub are mutually exclusive.

name

string / required

Name of the nic tag.

state

string

Create or delete a SmartOS nic tag.

Choices:

  • "absent"

  • "present" ← (default)

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Examples

- name: Create 'storage0' on '00:1b:21:a3:f5:4d'
  community.general.nictagadm:
    name: storage0
    mac: 00:1b:21:a3:f5:4d
    mtu: 9000
    state: present

- name: Remove 'storage0' nic tag
  community.general.nictagadm:
    name: storage0
    state: absent

Return Values

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

Key

Description

etherstub

boolean

specifies if the nic tag will create and attach to an etherstub.

Returned: always

Sample: false

force

boolean

Shows if -f was used during the deletion of a nic tag

Returned: always

Sample: false

mac

string

MAC Address that the nic tag was attached to.

Returned: always

Sample: "00:1b:21:a3:f5:4d"

mtu

integer

specifies which MTU size was passed during the nictagadm add command. mtu and etherstub are mutually exclusive.

Returned: always

Sample: 1500

name

string

nic tag name

Returned: always

Sample: "storage0"

state

string

state of the target

Returned: always

Sample: "present"

Authors

  • Bruce Smith (@SmithX10)