ansible.builtin.aix_devices (v2.9.27) — module

Manages AIX devices

| "added in version" 2.8 of ansible.builtin"

Authors: Kairo Araujo (@kairoaraujo)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

This module discovers, defines, removes and modifies attributes of AIX devices.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Scan new devices
  aix_devices:
    device: all
    state: available
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Scan new virtual devices (vio0)
  aix_devices:
    device: vio0
    state: available
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Removing IP alias to en0
  aix_devices:
    device: en0
    attributes:
      delalias4: 10.0.0.100,255.255.255.0
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Removes ent2
  aix_devices:
    device: ent2
    state: removed
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Put device en2 in Defined
  aix_devices:
    device: en2
    state: defined
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Removes ent4 (inexistent).
  aix_devices:
    device: ent4
    state: removed
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Put device en4 in Defined (inexistent)
  aix_devices:
    device: en4
    state: defined
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Put vscsi1 and children devices in Defined state.
  aix_devices:
    device: vscsi1
    recursive: yes
    state: defined
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Removes vscsi1 and children devices.
  aix_devices:
    device: vscsi1
    recursive: yes
    state: removed
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Changes en1 mtu to 9000 and disables arp.
  aix_devices:
    device: en1
    attributes:
      mtu: 900
      arp: off
    state: available
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure IP, netmask and set en1 up.
  aix_devices:
    device: en1
    attributes:
      netaddr: 192.168.0.100
      netmask: 255.255.255.0
      state: up
    state: available
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Adding IP alias to en0
  aix_devices:
    device: en0
    attributes:
      alias4: 10.0.0.100,255.255.255.0
    state: available

Inputs

    
force:
    default: false
    description:
    - Forces action.
    type: bool

state:
    choices:
    - available
    - defined
    - removed
    default: available
    description:
    - Controls the device state.
    - C(available) (alias C(present)) rescan a specific device or all devices (when C(device)
      is not specified).
    - C(removed) (alias C(absent) removes a device.
    - C(defined) changes device to Defined state.
    type: str

device:
    description:
    - The name of the device.
    - C(all) is valid to rescan C(available) all devices (AIX cfgmgr command).
    required: true
    type: str

recursive:
    default: false
    description:
    - Removes or defines a device and children devices.
    type: bool

attributes:
    description:
    - A list of device attributes.
    type: dict