junipernetworks.junos.junos_acl_interfaces – ACL interfaces resource module¶
Note
This plugin is part of the junipernetworks.junos collection (version 1.3.0).
To install it use: ansible-galaxy collection install junipernetworks.junos.
To use it in a playbook, specify: junipernetworks.junos.junos_acl_interfaces.
New in version 1.0.0: of junipernetworks.junos
Synopsis¶
This module manages adding and removing Access Control Lists (ACLs) from interfaces on devices running Juniper JUNOS.
Note
This module has a corresponding action plugin.
Requirements¶
The below requirements are needed on the host that executes this module.
ncclient (>=v0.6.4)
xmltodict (>=0.12.0)
Parameters¶
Notes¶
Note
This module requires the netconf system service be enabled on the device being managed.
This module works with connection
netconf. See the Junos OS Platform Options.Tested against JunOS v18.4R1
Examples¶
# Using deleted
# Before state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface with filter";
# unit 0 {
# family inet {
# filter {
# input inbound_acl;
# output outbound_acl;
# }
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
- name: Delete JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- name: ge-1/0/0
access_groups:
- afi: ipv4
acls:
- name: inbound_acl
direction: in
- name: outbound_acl
direction: out
state: deleted
# After state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface with filter";
# unit 0 {
# family inet {
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
# Using merged
# Before state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface without filter";
# unit 0 {
# family inet {
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
- name: Merge JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- name: ge-1/0/0
access_groups:
- afi: ipv4
acls:
- name: inbound_acl
direction: in
- name: outbound_acl
direction: out
state: merged
# After state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface with filter";
# unit 0 {
# family inet {
# filter {
# input inbound_acl;
# output outbound_acl;
# }
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
# Using overridden
# Before state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface without filter";
# unit 0 {
# family inet {
# filter {
# input foo_acl;
# }
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
- name: Override JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- name: ge-1/0/0
access_groups:
- afi: ipv4
acls:
- name: inbound_acl
direction: in
- name: outbound_acl
direction: out
state: overridden
# After state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface with filter";
# unit 0 {
# family inet {
# filter {
# input inbound_acl;
# output outbound_acl;
# }
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
# Using replaced
# Before state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface without filter";
# unit 0 {
# family inet {
# filter {
# input foo_acl;
# output outbound_acl;
# }
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
- name: Replace JUNOS L3 interface filter
junipernetworks.junos.junos_acl_interfaces:
config:
- name: ge-1/0/0
access_groups:
- afi: ipv4
acls:
- name: inbound_acl
direction: in
state: replaced
# After state:
# -------------
#
# admin# show interfaces
# ge-1/0/0 {
# description "L3 interface with filter";
# unit 0 {
# family inet {
# filter {
# input inbound_acl;
# output outbound_acl;
# }
# address 100.64.0.1/10;
# address 100.64.0.2/10;
# }
# family inet6;
# }
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Daniel Mellado (@dmellado)