New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial commit for fortios_webfilter #37196
Conversation
The test
The test
|
The test
|
"password": {"required": False, "type": "str"}, | ||
"vdom": {"required": False, "type": "str", "default": "root"}, | ||
"webfilter_url": {"required": False, "type": "dict"}, | ||
"webfilter_content": {"required": False, "type": "dict"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are using suboptions
in your DOCUMENTATION
you also need to add options
to your arguments that support this.
try: | ||
from fortiosapi import FortiOSAPI | ||
except ImportError: | ||
raise ImportError("fortiosapi module is required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not raise an exception. Instead you should use module.fail_json
except ImportError: | ||
raise ImportError("fortiosapi module is required") | ||
|
||
global fos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use a global. Pass it to your methods that require this object.
The test
The test
The test
The test
The test
The test
The test
The test
|
HI @sivel,
I suspect this may be wrong behavior or maybe I have coded something wrong in the argument spec (though it is still strange that 2nd level arguments work fine when I am debugging and using a json file as input, and not working ok when I run it CLI with ansible-playbook). Your validation here would be of great help. |
SUMMARY
Fortinet is adding Ansible support for FortiOS and FortiGate products. There is a previous work which was left on hold while we discussed a new approach more compatible with Ansible guidelines:
#33591 (comment)
In this new approach we will be creating a number of modules for FortiGate: system, wireless-controller, firewall, webfilter, ips, web-proxy, wanopt, application, dlp spamfilter, log, vpn, certificate, user, dnsfilter, antivirus, report, waf, authentication, switch controller, endpoint-control and router
This initial commit is intended for webfilter functionality and contains a part of the things that can be done with webfilter feature in FortiGate.
More features and module will be added later. We prefer to submit code in small chunks to ensure next modules are developed according to guidelines.
ISSUE TYPE
COMPONENT NAME
fortios_webfilter
ANSIBLE VERSION