ansible.builtin.junos_l3_interface (v2.4.3.0-1) — module

Manage L3 interfaces on Juniper JUNOS network devices

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

Authors: Ganesh Nalawade (@ganeshrn)

preview | supported by network

Install Ansible via pip

Install with pip install ansible==2.4.3.0.post1

Description

This module provides declarative management of L3 interfaces on Juniper JUNOS network devices.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set ge-0/0/1 IPv4 address
  junos_l3_interface:
    name: ge-0/0/1
    ipv4: 192.168.0.1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove ge-0/0/1 IPv4 address
  junos_l3_interface:
    name: ge-0/0/1
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set ipv4 address using aggregate
  junos_l3_interface:
    aggregate:
    - name: ge-0/0/1
      ipv4: 1.1.1.1
    - name: ge-0/0/2
      ipv4: 2.2.2.2
      ipv6: fd5d:12c9:2201:2::2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete ipv4 address using aggregate
  junos_l3_interface:
    aggregate:
    - name: ge-0/0/1
      ipv4: 1.1.1.1
    - name: ge-0/0/2
      ipv4: 2.2.2.2
    state: absent

Inputs

    
ipv4:
    description:
    - IPv4 of the L3 interface.

ipv6:
    description:
    - IPv6 of the L3 interface.

name:
    description:
    - Name of the L3 interface.

unit:
    default: 0
    description:
    - Logical interface number.

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the L3 interface configuration.

active:
    choices:
    - true
    - false
    default: true
    description:
    - Specifies whether or not the configuration is active or deactivated

aggregate:
    description: List of L3 interfaces definitions

Outputs

diff:
  description: Configuration difference before and after applying change.
  returned: when configuration is changed and diff option is enabled.
  sample: '[edit interfaces ge-0/0/1 unit 0 family inet] +       address 1.1.1.1/32;
    [edit interfaces ge-0/0/1 unit 0 family inet6] +       address fd5d:12c9:2201:1::1/128;

    '
  type: string