summaryrefslogtreecommitdiff
path: root/plugins/modules/vyos_firewall_global.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/modules/vyos_firewall_global.py')
-rw-r--r--plugins/modules/vyos_firewall_global.py150
1 files changed, 76 insertions, 74 deletions
diff --git a/plugins/modules/vyos_firewall_global.py b/plugins/modules/vyos_firewall_global.py
index 78db9f3..205ef13 100644
--- a/plugins/modules/vyos_firewall_global.py
+++ b/plugins/modules/vyos_firewall_global.py
@@ -28,6 +28,7 @@ The module file for vyos_firewall_global
from __future__ import absolute_import, division, print_function
+
__metaclass__ = type
@@ -297,30 +298,30 @@ EXAMPLES = """
all: true
broadcast: true
state_policy:
- - connection_type: established
- action: accept
- log: true
- - connection_type: invalid
- action: reject
+ - connection_type: established
+ action: accept
+ log: true
+ - connection_type: invalid
+ action: reject
route_redirects:
- - afi: ipv4
- ip_src_route: true
- icmp_redirects:
- send: true
- receive: false
+ - afi: ipv4
+ ip_src_route: true
+ icmp_redirects:
+ send: true
+ receive: false
group:
address_group:
- - name: MGMT-HOSTS
- description: This group has the Management hosts address list
- members:
- - address: 192.0.1.1
- - address: 192.0.1.3
- - address: 192.0.1.5
+ - name: MGMT-HOSTS
+ description: This group has the Management hosts address list
+ members:
+ - address: 192.0.1.1
+ - address: 192.0.1.3
+ - address: 192.0.1.5
network_group:
- - name: MGMT
- description: This group has the Management network addresses
- members:
- - address: 192.0.1.0/24
+ - name: MGMT
+ description: This group has the Management network addresses
+ members:
+ - address: 192.0.1.0/24
state: merged
#
#
@@ -676,6 +677,7 @@ EXAMPLES = """
# ]
#
# "after": []
+#
# After state
# ------------
# vyos@192# run show configuration commands | grep firewall
@@ -707,7 +709,7 @@ EXAMPLES = """
# set firewall state-policy invalid action 'reject'
# set firewall syn-cookies 'enable'
# set firewall twa-hazards-protection 'enable'
-#
+
- name: Replace firewall global attributes configuration.
vyos.vyos.vyos_firewall_global:
config:
@@ -716,39 +718,39 @@ EXAMPLES = """
log_martians: true
syn_cookies: true
twa_hazards_protection: true
- ping:
+ ping: null
all: true
broadcast: true
state_policy:
- - connection_type: established
- action: accept
- log: true
- - connection_type: invalid
- action: reject
+ - connection_type: established
+ action: accept
+ log: true
+ - connection_type: invalid
+ action: reject
route_redirects:
- - afi: ipv4
- ip_src_route: true
- icmp_redirects:
- send: true
- receive: false
+ - afi: ipv4
+ ip_src_route: true
+ icmp_redirects:
+ send: true
+ receive: false
group:
address_group:
- - name: SALES-HOSTS
- description: Sales office hosts address list
- members:
- - address: 192.0.2.1
- - address: 192.0.2.2
- - address: 192.0.2.3
- - name: ENG-HOSTS
- description: Sales office hosts address list
- members:
- - address: 192.0.3.1
- - address: 192.0.3.2
+ - name: SALES-HOSTS
+ description: Sales office hosts address list
+ members:
+ - address: 192.0.2.1
+ - address: 192.0.2.2
+ - address: 192.0.2.3
+ - name: ENG-HOSTS
+ description: Sales office hosts address list
+ members:
+ - address: 192.0.3.1
+ - address: 192.0.3.2
network_group:
- - name: MGMT
- description: This group has the Management network addresses
- members:
- - address: 192.0.1.0/24
+ - name: MGMT
+ description: This group has the Management network addresses
+ members:
+ - address: 192.0.1.0/24
state: replaced
#
#
@@ -966,7 +968,6 @@ EXAMPLES = """
#
- name: Gather firewall global config with provided configurations
vyos.vyos.vyos_firewall_global:
- config:
state: gathered
#
#
@@ -1089,40 +1090,41 @@ EXAMPLES = """
log_martians: true
syn_cookies: true
twa_hazards_protection: true
- ping:
+ ping: null
all: true
broadcast: true
state_policy:
- - connection_type: established
- action: accept
- log: true
- - connection_type: invalid
- action: reject
+ - connection_type: established
+ action: accept
+ log: true
+ - connection_type: invalid
+ action: reject
route_redirects:
- - afi: ipv4
- ip_src_route: true
- icmp_redirects:
- send: true
- receive: false
+ - afi: ipv4
+ ip_src_route: true
+ icmp_redirects: null
+ send: true
+ receive: false
group:
address_group:
- - name: SALES-HOSTS
- description: Sales office hosts address list
- members:
- - address: 192.0.2.1
- - address: 192.0.2.2
- - address: 192.0.2.3
- - name: ENG-HOSTS
- description: Sales office hosts address list
- members:
- - address: 192.0.3.1
- - address: 192.0.3.2
+ - name: SALES-HOSTS
+ description: Sales office hosts address list
+ members:
+ - address: 192.0.2.1
+ - address: 192.0.2.2
+ - address: 192.0.2.3
+ - name: ENG-HOSTS
+ description: Sales office hosts address list
+ members:
+ - address: 192.0.3.1
+ - address: 192.0.3.2
network_group:
- - name: MGMT
- description: This group has the Management network addresses
- members:
- - address: 192.0.1.0/24
+ - name: MGMT
+ description: This group has the Management network addresses
+ members:
+ - address: 192.0.1.0/24
state: rendered
+
#
#
# -------------------------