Fortinet: fmgr_fwpol_ipv4 update/behavioral option fix (#58154)
* PR Update to fmgr_fwpol_ipv4 -- now allows for failure or skip behavior option upon missing dependencies * fmgr_fwpol_ipv4 minor docs fix * Removed "system_package_print" line from test/sanity/ignore.txt as instructed by failed shippable test. Actual PR module isn't affected.
This commit is contained in:
parent
45cc29ba08
commit
df6d46fed3
3 changed files with 122 additions and 109 deletions
|
@ -59,6 +59,15 @@ options:
|
|||
required: false
|
||||
default: "default"
|
||||
|
||||
fail_on_missing_dependency:
|
||||
description:
|
||||
- Normal behavior is to "skip" tasks that fail dependency checks, so other tasks can run.
|
||||
- If set to "enabled" if a failed dependency check happeens, Ansible will exit as with failure instead of skip.
|
||||
required: false
|
||||
default: "disable"
|
||||
choices: ["enable", "disable"]
|
||||
version_added: "2.9"
|
||||
|
||||
wsso:
|
||||
description:
|
||||
- Enable/disable WiFi Single Sign On (WSSO).
|
||||
|
@ -1024,7 +1033,8 @@ def main():
|
|||
adom=dict(type="str", default="root"),
|
||||
mode=dict(choices=["add", "set", "delete", "update"], type="str", default="add"),
|
||||
package_name=dict(type="str", required=False, default="default"),
|
||||
|
||||
fail_on_missing_dependency=dict(type="str", required=False, default="disable", choices=["enable",
|
||||
"disable"]),
|
||||
wsso=dict(required=False, type="str", choices=["disable", "enable"]),
|
||||
webfilter_profile=dict(required=False, type="str"),
|
||||
webcache_https=dict(required=False, type="str", choices=["disable", "enable"]),
|
||||
|
@ -1335,8 +1345,12 @@ def main():
|
|||
|
||||
try:
|
||||
results = fmgr_firewall_policy_modify(fmgr, paramgram)
|
||||
fmgr.govern_response(module=module, results=results, good_codes=[0, -9998],
|
||||
ansible_facts=fmgr.construct_ansible_facts(results, module.params, paramgram))
|
||||
if module.params["fail_on_missing_dependency"] == "disable":
|
||||
fmgr.govern_response(module=module, results=results, good_codes=[0, -9998],
|
||||
ansible_facts=fmgr.construct_ansible_facts(results, module.params, paramgram))
|
||||
if module.params["fail_on_missing_dependency"] == "enable" and results[0] == -10131:
|
||||
fmgr.govern_response(module=module, results=results, good_codes=[0, ], failed=True, skipped=False,
|
||||
ansible_facts=fmgr.construct_ansible_facts(results, module.params, paramgram))
|
||||
except Exception as err:
|
||||
raise FMGBaseException(err)
|
||||
|
||||
|
|
|
@ -6640,7 +6640,6 @@ test/units/modules/network/radware/test_vdirect_file.py future-import-boilerplat
|
|||
test/units/modules/network/radware/test_vdirect_file.py metaclass-boilerplate
|
||||
test/units/modules/network/radware/test_vdirect_runnable.py future-import-boilerplate
|
||||
test/units/modules/network/radware/test_vdirect_runnable.py metaclass-boilerplate
|
||||
test/units/modules/network/routeros/fixtures/system_package_print line-endings
|
||||
test/units/modules/notification/test_slack.py future-import-boilerplate
|
||||
test/units/modules/notification/test_slack.py metaclass-boilerplate
|
||||
test/units/modules/packaging/language/test_gem.py future-import-boilerplate
|
||||
|
|
Loading…
Reference in a new issue