mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
fix #894 by actually updating with the modified settings
This commit is contained in:
@@ -76,7 +76,7 @@ options:
|
||||
notes:
|
||||
- Not tested on any Debian based system.
|
||||
requirements: [ 'firewalld >= 0.2.11' ]
|
||||
author: "Adam Miller (@maxamillion)"
|
||||
author: "Adam Miller (@maxamillion)"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -137,7 +137,7 @@ def set_port_disabled_permanent(zone, port, protocol):
|
||||
|
||||
####################
|
||||
# source handling
|
||||
#
|
||||
#
|
||||
def get_source(zone, source):
|
||||
fw_zone = fw.config().getZoneByName(zone)
|
||||
fw_settings = fw_zone.getSettings()
|
||||
@@ -150,11 +150,13 @@ def add_source(zone, source):
|
||||
fw_zone = fw.config().getZoneByName(zone)
|
||||
fw_settings = fw_zone.getSettings()
|
||||
fw_settings.addSource(source)
|
||||
fw_zone.update(fw_settings)
|
||||
|
||||
def remove_source(zone, source):
|
||||
fw_zone = fw.config().getZoneByName(zone)
|
||||
fw_settings = fw_zone.getSettings()
|
||||
fw_settings.removeSource(source)
|
||||
fw_zone.update(fw_settings)
|
||||
|
||||
####################
|
||||
# service handling
|
||||
@@ -190,7 +192,7 @@ def set_service_disabled_permanent(zone, service):
|
||||
fw_settings = fw_zone.getSettings()
|
||||
fw_settings.removeService(service)
|
||||
fw_zone.update(fw_settings)
|
||||
|
||||
|
||||
|
||||
####################
|
||||
# rich rule handling
|
||||
|
||||
Reference in New Issue
Block a user