wojtek0806.f5os.f5os_interface (0.3.0) — module

Manage network interfaces on F5OS based systems

| "added in version" 1.0.0 of wojtek0806.f5os"

Authors: Ravinder Reddy (@chinthalapalli), Wojciech Wypior (@wojtek0806)

Install collection

Install with ansible-galaxy collection install wojtek0806.f5os:==0.3.0


Add to requirements.yml

  collections:
    - name: wojtek0806.f5os
      version: 0.3.0

Description

Manage network interfaces on F5OS systems like VELOS partitions or rSeries platforms.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- hosts: all
  collections:
    - f5networks.f5os
  connection: httpapi

  vars:
    ansible_host: "lb.mydomain.com"
    ansible_user: "admin"
    ansible_httpapi_password: "secret"
    ansible_network_os: f5networks.f5os.f5os
    ansible_httpapi_use_ssl: yes

  tasks:
    - name: Creating VLAN444
      f5os_vlan:
        name: vlan-444
        vlan_id: 444

    - name: Creating VLAN555
      f5os_vlan:
        name: vlan-555
        vlan_id: 555

    - name: Attach Vlans to interface on Velos Partition
      f5os_interface:
        name: "2/1.0"
        trunk_vlans: [444]
        state: present

    - name: Modify Vlans to interface on Velos Partition
      f5os_interface:
        name: "2/1.0"
        trunk_vlans: [444,555]
        state: present

    - name: Delete vlans on interface on Velos Partition
      f5os_interface:
        name: "1.0"
        trunk_vlans: [444,555]
        state: absent

    - name: Attach Vlans to interface on rSeries Platform
      f5os_interface:
        name: "1.0"
        trunk_vlans: [444]
        state: present

    - name: Modify Vlans to interface on rSeries Platform
      f5os_interface:
        name: "1.0"
        trunk_vlans: [444,555]
        state: present

    - name: Delete vlans on interface on rSeries Platform
      f5os_interface:
        name: "1.0"
        trunk_vlans: [444,555]
        state: absent

Inputs

    
name:
    description:
    - Name of the interface to configure.
    - For VELOS partitions blade/port format is required e.g. 1/1.0
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - If C(present), creates the specified object if it does not exist, or updates the
      existing object.
    - If C(absent), deletes the object if it exists.
    type: str

native_vlan:
    description:
    - Configures the VLAN ID to associate with the interface.
    - The C(native_vlans) parameter is used for untagged traffic.
    type: int

trunk_vlans:
    description:
    - Configures multiple VLAN IDs to associate with the interface.
    - The C(trunk_vlans) parameter is used for tagged traffic.
    - VLANs should not be assigned to interfaces if Link Aggregation Groups. In that case,
      VLANs should be added to the the LAG configuration with C(f5os_lag) module instead.
    - The order of these VLANs is ignored, the module orders the VLANs automatically.
    elements: int
    type: list

Outputs

name:
  description: Name of the partition interface to configure.
  returned: changed
  sample: 1.0
  type: str
native_vlan:
  description: Native VLAN to attach to the interface
  returned: changed
  sample: 222
  type: int
trunk_vlans:
  description: Trunk VLANs to attach to the interface
  returned: changed
  sample:
  - 444
  - 555
  type: list