mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Fix firewalld source option handling to be exclusive (#55715)
- Fix issue #55683 - Add integration test for source option of firewalld module Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
parent
c707dd7b62
commit
c455635500
4 changed files with 93 additions and 1 deletions
|
@ -706,10 +706,12 @@ def main():
|
|||
modification_count += 1
|
||||
if masquerade is not None:
|
||||
modification_count += 1
|
||||
if source is not None:
|
||||
modification_count += 1
|
||||
|
||||
if modification_count > 1:
|
||||
module.fail_json(
|
||||
msg='can only operate on port, service, rich_rule, masquerade, icmp_block, icmp_block_inversion, or interface at once'
|
||||
msg='can only operate on port, service, rich_rule, masquerade, icmp_block, icmp_block_inversion, interface or source at once'
|
||||
)
|
||||
elif modification_count > 0 and desired_state in ['absent', 'present']:
|
||||
module.fail_json(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue