community.general.ip_netns (8.5.0) — module

Manage network namespaces

Authors: Arie Bregman (@bregman-arie)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Create or delete network namespaces using the ip command.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a namespace named mario
  community.general.ip_netns:
    name: mario
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete a namespace named luigi
  community.general.ip_netns:
    name: luigi
    state: absent

Inputs

    
name:
    description:
    - Name of the namespace
    required: false
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether the namespace should exist
    required: false
    type: str