Init: mediaserver

This commit is contained in:
2023-02-08 12:13:28 +01:00
parent 848bc9739c
commit f7c23d4ba9
31914 changed files with 6175775 additions and 0 deletions

View File

@@ -0,0 +1,294 @@
==============================
Fortinet.Fortios Release Notes
==============================
.. contents:: Topics
v2.2.2
======
Release Summary
---------------
patch release of 2.2.2
Bugfixes
--------
- Fix runtime issue (#214);
- Add required field for module log_fact;
- Fix sanity test errors in validate-modules test;
v2.2.1
======
Release Summary
---------------
patch release of 2.2.1
Bugfixes
--------
- Fix invalid arguments in version_schemas;
- Fix list type arguments inconsistency;
- Fix validate-modules error: type not match and name not validate;
- Fix supports_check_mode issue for _info and _facts modules;
Improvements
--------
- Remove ignore-x.txt files;
- Update required ansible to >=2.9.10;
v2.2.0
======
Release Summary
---------------
patch release of 2.2.0
Major Changes
-------------
- Support FortiOS v7.0.6, v7.0.7, v7.0.8, v7.2.1, v7.2.2.
Bugfixes
--------
- Fix issue of missing some options for monitor modules (#196);
- Fix issue of filter content could not contain spaces (#208);
- Fix list type not match issue;
New modules
--------
- ``fortios_extension_controller_dataplan`` - FortiExtender dataplan configuration in Fortinet's FortiOS and FortiGate;
- ``fortios_extension_controller_extender_profile`` - FortiExtender extender profile configuration in Fortinet's FortiOS and FortiGate;
- ``fortios_extension_controller_extender`` - Extender controller configuration in Fortinet's FortiOS and FortiGate.
- ``fortios_extension_controller_fortigate_profile`` - FortiGate connector profile configuration in Fortinet's FortiOS and FortiGate.
- ``fortios_extension_controller_fortigate`` - FortiGate controller configuration in Fortinet's FortiOS and FortiGate.
- ``fortios_firewall_global`` - Global firewall settings in Fortinet's FortiOS and FortiGate.
- ``fortios_firewall_network_service_dynamic`` - Configure Dynamic Network Services in Fortinet's FortiOS and FortiGate.
Improvements
--------
- Update arguments' value in example;
- Update document to reflect accurate version map;
v2.1.7
======
Release Summary
---------------
patch release of 2.1.7
Major Changes
-------------
- Support Diff feature in check_mode.
- Support Fortios 7.2.0.
Bugfixes
--------
- Fix the Github Issue 187.
- Fix the Github Issue 188 and 189.
- Fix the Github Issue 190.
- Fix the Github Issue 191.
- Fix the error message in the debugging log when using ``access_token``.
- Fix the issue when filtering out parameter with space in the module ``fortios_configuration_fact``.
- Fix typo in the documentation of ``Install FortiOS Galaxy Collection``.
v2.1.6
======
Release Summary
---------------
patch release of 2.1.6
Bugfixes
--------
- Add defaut value for enable_log param.
- Fix import issues in sanity-test and improve unit tests.
- Fix parameter-list-no-elements error in sanity-test.
- Fix syntax issue in python2.7.
- Fix the syntax error in the three wireless_controller_hotspot20 modules.
- Relicense the FortiOS Collection under GPLv3+.
- Update the logic in check_legacy_fortiosapi.
- Use collection version number in the doc.
v2.1.5
======
Release Summary
---------------
patch release of 2.1.5
Major Changes
-------------
- Support FortiOS 7.0.2, 7.0.3, 7.0.4, 7.0.5.
Bugfixes
--------
- Fix issues in version mismatch logic.
- Fix status issue in fortios_json_generic().
- Fix the issue of inconsistent data types in different schemas.
v2.1.4
======
v2.1.3
======
Release Summary
---------------
patch release of 2.1.3
Major Changes
-------------
- Add real-world use cases in the example section for some configuration modules.
- Collect the current configurations of the modules and convert them into playbooks.
- Support FortiOS 7.0.1.
- Support member operation (delete/add extra members) on an object that has a list of members in it.
- Support selectors feature in ``fortios_monitor_fact`` and ``fortios_log_fact``.
Bugfixes
--------
- Fix Github issue
- Fix the corner cases that response does not have status in it.
- Fix the filters error when fetching multiple facts with selectors for a configuration module (Github issue
v2.1.2
======
Release Summary
---------------
patch release of 2.1.2
Bugfixes
--------
- Fix a regression bug caused by non-required attributes.
- Fix an intentional exception for listed options.
v2.1.1
======
Release Summary
---------------
patch release of 2.1.1
Bugfixes
--------
- Fix the KeyError caused by non-required multi-value attributes in an object.
v2.1.0
======
Release Summary
---------------
minor release of 2.1.0
Major Changes
-------------
- New module fortios_monitor_fact.
- Support Fortios 7.0.
- Support Log APIs.
Bugfixes
--------
- Disable check_mode feature from all global objects of configuration modules due to 'state' issue.
- Fix a bug in IP_PREFIX.match().
- Fix the issue that the ``server_type`` is not updated in ``fortios_system_central_management``.
- Fix the unexpected warning caused by optinal params in ``fortios_monitor_fact`` and ``fortios_monitor``.
v2.0.2
======
Release Summary
---------------
patch release of 2.0.2
Major Changes
-------------
- Improve ``fortios_configuration_fact`` to use multiple selectors concurrently.
- Support ``check_mode`` in all cofigurationAPI-based modules.
- Support filtering for fact gathering modules ``fortios_configuration_fact`` and ``fortios_monitor_fact``.
- Support moving policy in ``firewall_central_snat_map``.
- Unify schemas for monitor API.
Bugfixes
--------
- Fix the authorization fails at log in with username and password in FOS7.0.
- Github Issue 103
- Github Issue 105
v2.0.1
======
Minor Changes
-------------
- fixed pylint testing errors.
v2.0.0
======
Release Summary
---------------
The major breaking release of FOS 2.x collections.
Major Changes
-------------
- New module fortios_configuration_fact
- New module fortios_json_generic
- New module fortios_monitor
- New module fortios_monitor_fact
Breaking Changes / Porting Guide
--------------------------------
- Generic FortiOS Module - FOS module to issue generic request with Ansible.
- Support for FOS Monitor API - several modules are new for monitor API.
- Unified Collection - The fortios collection itself will be adapting any FOS platforms.
Removed Features (previously deprecated)
----------------------------------------
- Removed module fortios_facts
- Removed module fortios_registration_forticare
- Removed module fortios_registration_vdom
- Removed module fortios_system_config_backup_restore
- Removed module fortios_system_vmlicense
Bugfixes
--------
- Deprecated second-layer state module parameter
- enable_log - Explicit logging option.
Known Issues
------------
- Modules for monitor API are not versioned yet.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -0,0 +1,43 @@
{
"collection_info": {
"namespace": "fortinet",
"name": "fortios",
"version": "2.2.2",
"authors": [
"Frank Shen (@frankshen01)",
"Hongbin Lu (@fgtdev-hblu)",
"Link Zheng (@chillancezen)",
"Jie Xue (@JieX19)",
"Miguel Angel Munoz (@mamunozgonzalez)",
"Nicolas Thomas (@thomnico)"
],
"readme": "README.md",
"tags": [
"fortios",
"networking",
"firewall",
"security",
"fortinet"
],
"description": "A collection of Ansible Modules for FortiOS v6",
"license": [
"GPL-3.0-or-later"
],
"license_file": null,
"dependencies": {
"ansible.netcommon": "*"
},
"repository": "https://github.com/fortinet-ansible-dev/ansible-galaxy-fortios-collection",
"documentation": "https://ansible-galaxy-fortios-docs.readthedocs.io/en/latest",
"homepage": "https://www.fortinet.com",
"issues": "https://github.com/fortinet-ansible-dev/ansible-galaxy-fortios-collection/issues"
},
"file_manifest_file": {
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "f689f240d899fe6b41c32d582509e4eea2764c5260cae43b24601e8834175980",
"format": 1
},
"format": 1
}

View File

@@ -0,0 +1,732 @@
![Fortinet logo|](https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Fortinet_logo.svg/320px-Fortinet_logo.svg.png)
## FortiOS Ansible Collection
***
The collection is the FortiOS Ansible Automation project. It includes the modules that are able to configure FortiOS and FortiGate by allowing the user to configure firewall features.
## Installation
This collection is distributed via [ansible-galaxy](https://galaxy.ansible.com/), the installation steps are as follows:
1. Install or upgrade to Ansible 2.9+
2. Download this collection from galaxy: `ansible-galaxy collection install fortinet.fortios:2.2.2`
## Requirements
* Ansible 2.9+ is required to support the newer Ansible Collections format
## Supported FortiOS Versions
From `v2.0.0` on, FortiOS galaxy collections are unified, and cover FortiOS 6.0, 6.2, 6.4, 7.0, 7.2 versions. There is only one sequential collection at any moment. users who install these collections are expected to find the version compatibility information for each module and its parameters.
The latest version is 2.2.2, path to install: `ansible-galaxy collection install fortinet.fortios:2.2.2`
Prior to FortiOS collection `v2.0.0`, FortiOS Galaxy collections were built over three FOS major versions, i.e. `v6.0`, `v6.2` and `v6.4`, thus, users are expected to install the collection according to the following table to avoid potential compatibility issues.
| FOS version|Galaxy Version| Release date|Path to Install |
|----------|:-------------:|:-------------:|:------:|
|6.0.0|1.0.13 |2020/5/26|`ansible-galaxy collection install fortinet.fortios:1.0.13`|
|6.0.0|1.1.2 |2020/12/4|`ansible-galaxy collection install fortinet.fortios:1.1.2`|
|6.0.0|1.1.5 |2020/12/7|`ansible-galaxy collection install fortinet.fortios:1.1.5`|
|6.0.0|1.1.8 |2020/12/21|`ansible-galaxy collection install fortinet.fortios:1.1.8`|
|6.0.0|1.1.9 `latest`|2021/3/1|`ansible-galaxy collection install fortinet.fortios:1.1.9`|
|6.2.0|1.0.10 |2020/5/6|`ansible-galaxy collection install fortinet.fortios:1.0.10`|
|6.2.0|1.1.0 |2020/12/4|`ansible-galaxy collection install fortinet.fortios:1.1.0`|
|6.2.0|1.1.3 |2020/12/7|`ansible-galaxy collection install fortinet.fortios:1.1.3`|
|6.2.0|1.1.6 `latest`|2020/12/21|`ansible-galaxy collection install fortinet.fortios:1.1.6`|
|6.4.0|1.0.11 |2020/5/11|`ansible-galaxy collection install fortinet.fortios:1.0.11`|
|6.4.0|1.1.1 |2020/12/4|`ansible-galaxy collection install fortinet.fortios:1.1.1`|
|6.4.0|1.1.4 |2020/12/7|`ansible-galaxy collection install fortinet.fortios:1.1.4`|
|6.4.0|1.1.7 `latest`|2020/12/21|`ansible-galaxy collection install fortinet.fortios:1.1.7`|
__Note__: Use `-f` option (i.e. `ansible-galaxy collection install -f fortinet.fortios:x.x.x`) to renew your existing local installation.
## Modules
The collection provides the following modules:
* `fortios_alertemail_setting` Configure alert email settings in Fortinet's FortiOS and FortiGate.
* `fortios_antivirus_heuristic` Configure global heuristic options in Fortinet's FortiOS and FortiGate.
* `fortios_antivirus_mms_checksum` Configure MMS content checksum list in Fortinet's FortiOS and FortiGate.
* `fortios_antivirus_notification` Configure AntiVirus notification lists in Fortinet's FortiOS and FortiGate.
* `fortios_antivirus_profile` Configure AntiVirus profiles in Fortinet's FortiOS and FortiGate.
* `fortios_antivirus_quarantine` Configure quarantine options in Fortinet's FortiOS and FortiGate.
* `fortios_antivirus_settings` Configure AntiVirus settings in Fortinet's FortiOS and FortiGate.
* `fortios_application_custom` Configure custom application signatures in Fortinet's FortiOS and FortiGate.
* `fortios_application_group` Configure firewall application groups in Fortinet's FortiOS and FortiGate.
* `fortios_application_list` Configure application control lists in Fortinet's FortiOS and FortiGate.
* `fortios_application_name` Configure application signatures in Fortinet's FortiOS and FortiGate.
* `fortios_application_rule_settings` Configure application rule settings in Fortinet's FortiOS and FortiGate.
* `fortios_authentication_rule` Configure Authentication Rules in Fortinet's FortiOS and FortiGate.
* `fortios_authentication_scheme` Configure Authentication Schemes in Fortinet's FortiOS and FortiGate.
* `fortios_authentication_setting` Configure authentication setting in Fortinet's FortiOS and FortiGate.
* `fortios_automation_setting` Automation setting configuration in Fortinet's FortiOS and FortiGate.
* `fortios_certificate_ca` CA certificate in Fortinet's FortiOS and FortiGate.
* `fortios_certificate_crl` Certificate Revocation List as a PEM file in Fortinet's FortiOS and FortiGate.
* `fortios_certificate_local` Local keys and certificates in Fortinet's FortiOS and FortiGate.
* `fortios_certificate_remote` Remote certificate as a PEM file in Fortinet's FortiOS and FortiGate.
* `fortios_cifs_domain_controller` Define known domain controller servers in Fortinet's FortiOS and FortiGate.
* `fortios_cifs_profile` Configure CIFS profile in Fortinet's FortiOS and FortiGate.
* `fortios_configuration_fact` Retrieve Facts of FortiOS Configurable Objects.
* `fortios_credential_store_domain_controller` Define known domain controller servers in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_data_type` Configure predefined data type used by DLP blocking in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_dictionary` Configure dictionaries used by DLP blocking in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_filepattern` Configure file patterns used by DLP blocking in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_fp_doc_source` Create a DLP fingerprint database by allowing the FortiGate to access a file server containing files from which to create fingerprints in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_fp_sensitivity` Create self-explanatory DLP sensitivity levels to be used when setting sensitivity under config fp-doc-source in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_profile` Configure DLP profiles in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_sensitivity` Create self-explanatory DLP sensitivity levels to be used when setting sensitivity under config fp-doc-source in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_sensor` Configure sensors used by DLP blocking in Fortinet's FortiOS and FortiGate.
* `fortios_dlp_settings` Designate logical storage for DLP fingerprint database in Fortinet's FortiOS and FortiGate.
* `fortios_dnsfilter_domain_filter` Configure DNS domain filters in Fortinet's FortiOS and FortiGate.
* `fortios_dnsfilter_profile` Configure DNS domain filter profile in Fortinet's FortiOS and FortiGate.
* `fortios_dpdk_cpus` Configure CPUs enabled to run engines in each DPDK stage in Fortinet's FortiOS and FortiGate.
* `fortios_dpdk_global` Configure global DPDK options in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_block_allow_list` Configure anti-spam block/allow list in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_bwl` Configure anti-spam black/white list in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_bword` Configure AntiSpam banned word list in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_dnsbl` Configure AntiSpam DNSBL/ORBL in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_fortishield` Configure FortiGuard - AntiSpam in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_iptrust` Configure AntiSpam IP trust in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_mheader` Configure AntiSpam MIME header in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_options` Configure AntiSpam options in Fortinet's FortiOS and FortiGate.
* `fortios_emailfilter_profile` Configure Email Filter profiles in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_client` Configure endpoint control client lists in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_fctems` Configure FortiClient Enterprise Management Server (EMS) entries in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_forticlient_ems` Configure FortiClient Enterprise Management Server (EMS) entries in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_forticlient_registration_sync` Configure FortiClient registration synchronization settings in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_profile` Configure FortiClient endpoint control profiles in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_registered_forticlient` Registered FortiClient list in Fortinet's FortiOS and FortiGate.
* `fortios_endpoint_control_settings` Configure endpoint control settings in Fortinet's FortiOS and FortiGate.
* `fortios_export_config_playbook` Convert the returned facts into a playbook.
* `fortios_extender_controller_dataplan` FortiExtender dataplan configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extender_controller_extender` Extender controller configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extender_controller_extender_profile` FortiExtender extender profile configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extender_extender_info` Display FortiExtender struct information in Fortinet's FortiOS and FortiGate.
* `fortios_extender_lte_carrier_by_mcc_mnc` Display FortiExtender modem carrier based on MCC and MNC in Fortinet's FortiOS and FortiGate.
* `fortios_extender_lte_carrier_list` Display FortiExtender modem carrier list in Fortinet's FortiOS and FortiGate.
* `fortios_extender_modem_status` Display detailed FortiExtender modem status in Fortinet's FortiOS and FortiGate.
* `fortios_extender_sys_info` Display detailed FortiExtender system information in Fortinet's FortiOS and FortiGate.
* `fortios_extension_controller_dataplan` FortiExtender dataplan configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extension_controller_extender` Extender controller configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extension_controller_extender_profile` FortiExtender extender profile configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extension_controller_fortigate` FortiGate controller configuration in Fortinet's FortiOS and FortiGate.
* `fortios_extension_controller_fortigate_profile` FortiGate connector profile configuration in Fortinet's FortiOS and FortiGate.
* `fortios_file_filter_profile` Configure file-filter profiles in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_access_proxy6` Configure IPv6 access proxy in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_access_proxy` Configure IPv4 access proxy in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_access_proxy_ssh_client_cert` Configure Access Proxy SSH client certificate in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_access_proxy_virtual_host` Configure Access Proxy virtual hosts in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_acl6` Configure IPv6 access control list in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_acl` Configure IPv4 access control list in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_address6` Configure IPv6 firewall addresses in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_address6_template` Configure IPv6 address templates in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_address` Configure IPv4 addresses in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_addrgrp6` Configure IPv6 address groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_addrgrp` Configure IPv4 address groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_auth_portal` Configure firewall authentication portals in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_carrier_endpoint_bwl` Carrier end point black/white list tables in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_central_snat_map` Configure IPv4 and IPv6 central SNAT policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_city` Define city table in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_consolidated_policy` Configure consolidated IPv4/IPv6 policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_country` Define country table in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_decrypted_traffic_mirror` Configure decrypted traffic mirror in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_dnstranslation` Configure DNS translation in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_dos_policy6` Configure IPv6 DoS policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_dos_policy` Configure IPv4 DoS policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_global` Global firewall settings in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_gtp` Configure GTP in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_identity_based_route` Configure identity based routing in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_interface_policy6` Configure IPv6 interface policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_interface_policy` Configure IPv4 interface policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_addition` Configure Internet Services Addition in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_append` Configure additional port mappings for Internet Services in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_botnet` Show Internet Service botnet in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_custom` Configure custom Internet Services in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_custom_group` Configure custom Internet Service group in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_definition` Configure Internet Service definition in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_extension` Configure Internet Services Extension in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_group` Configure group of Internet Service in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_ipbl_reason` IP block list reason in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_ipbl_vendor` IP block list vendor in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_list` Internet Service list in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_name` Define internet service names in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_owner` Internet Service owner in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_reputation` Show Internet Service reputation in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service` Show Internet Service application in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_internet_service_sld` Internet Service Second Level Domain in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ipmacbinding_setting` Configure IP to MAC binding settings in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ipmacbinding_table` Configure IP to MAC address pairs in the IP/MAC binding table in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ippool6` Configure IPv6 IP pools in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ippool` Configure IPv4 IP pools in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_iprope_list` List in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ip_translation` Configure firewall IP-translation in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ipv6_eh_filter` Configure IPv6 extension header filter in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ldb_monitor` Configure server load balancing health monitors in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_local_in_policy6` Configure user defined IPv6 local-in policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_local_in_policy` Configure user defined IPv4 local-in policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_mms_profile` Configure MMS profiles in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_multicast_address6` Configure IPv6 multicast address in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_multicast_address` Configure multicast addresses in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_multicast_policy6` Configure IPv6 multicast NAT policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_multicast_policy` Configure multicast NAT policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_network_service_dynamic` Configure Dynamic Network Services in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_pfcp` Configure PFCP in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_policy46` Configure IPv4 to IPv6 policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_policy64` Configure IPv6 to IPv4 policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_policy6` Configure IPv6 policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_policy` Configure IPv4/IPv6 policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_profile_group` Configure profile groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_profile_protocol_options` Configure protocol options in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_proute` List policy routing in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_proxy_address` Configure web proxy address in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_proxy_addrgrp` Configure web proxy address group in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_proxy_policy` Configure proxy policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_region` Define region table in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_schedule_group` Schedule group configuration in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_schedule_onetime` Onetime schedule configuration in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_schedule_recurring` Recurring schedule configuration in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_security_policy` Configure NGFW IPv4/IPv6 application policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_service_category` Configure service categories in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_service_custom` Configure custom services in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_service_group` Configure service groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_shaper_per_ip_shaper` Configure per-IP traffic shaper in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_shaper_traffic_shaper` Configure shared traffic shaper in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_shaping_policy` Configure shaping policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_shaping_profile` Configure shaping profiles in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_sniffer` Configure sniffer in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssh_host_key` SSH proxy host public keys in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssh_local_ca` SSH proxy local CA in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssh_local_key` SSH proxy local keys in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssh_setting` SSH proxy settings in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssl_server` Configure SSL servers in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssl_setting` SSL proxy settings in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ssl_ssh_profile` Configure SSL/SSH protocol options in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_traffic_class` Configure names for shaping classes in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_ttl_policy` Configure TTL policies in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vendor_mac` Show vendor and the MAC address they have in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vip46` Configure IPv4 to IPv6 virtual IPs in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vip64` Configure IPv6 to IPv4 virtual IPs in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vip6` Configure virtual IP for IPv6 in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vip` Configure virtual IP for IPv4 in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vipgrp46` Configure IPv4 to IPv6 virtual IP groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vipgrp64` Configure IPv6 to IPv4 virtual IP groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vipgrp6` Configure IPv6 virtual IP groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_vipgrp` Configure IPv4 virtual IP groups in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_wildcard_fqdn_custom` Config global/VDOM Wildcard FQDN address in Fortinet's FortiOS and FortiGate.
* `fortios_firewall_wildcard_fqdn_group` Config global Wildcard FQDN address groups in Fortinet's FortiOS and FortiGate.
* `fortios_ftp_proxy_explicit` Configure explicit FTP proxy settings in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_apn` Configure APN for GTP in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_apngrp` Configure APN groups for GTP in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_apn_shaper` Global per-APN shaper in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_ie_allow_list` IE allow list in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_ie_white_list` IE white list in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_message_filter_v0v1` Message filter for GTPv0/v1 messages in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_message_filter_v2` Message filter for GTPv2 messages in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_rat_timeout_profile` RAT timeout profil in Fortinet's FortiOS and FortiGate.
* `fortios_gtp_tunnel_limit` GTP tunnel limiter in Fortinet's FortiOS and FortiGate.
* `fortios_hardware_nic` Display NIC information in Fortinet's FortiOS and FortiGate.
* `fortios_hardware_npu_np6_dce` Show NP6 non-zero subengine drop counters in Fortinet's FortiOS and FortiGate.
* `fortios_hardware_npu_np6_session_stats` Show NP6 session offloading statistics counters in Fortinet's FortiOS and FortiGate.
* `fortios_hardware_npu_np6_sse_stats` Show NP6 hardware session statistics counters in Fortinet's FortiOS and FortiGate.
* `fortios_icap_profile` Configure ICAP profiles in Fortinet's FortiOS and FortiGate.
* `fortios_icap_server` Configure ICAP servers in Fortinet's FortiOS and FortiGate.
* `fortios_icap_server_group` Configure an ICAP server group consisting of multiple forward servers. Supports failover and load balancing in Fortinet's FortiOS and FortiGate.
* `fortios_ips_custom` Configure IPS custom signature in Fortinet's FortiOS and FortiGate.
* `fortios_ips_decoder` Configure IPS decoder in Fortinet's FortiOS and FortiGate.
* `fortios_ips_global` Configure IPS global parameter in Fortinet's FortiOS and FortiGate.
* `fortios_ips_rule` Configure IPS rules in Fortinet's FortiOS and FortiGate.
* `fortios_ips_rule_settings` Configure IPS rule setting in Fortinet's FortiOS and FortiGate.
* `fortios_ips_sensor` Configure IPS sensor in Fortinet's FortiOS and FortiGate.
* `fortios_ips_settings` Configure IPS VDOM parameter in Fortinet's FortiOS and FortiGate.
* `fortios_ips_view_map` Configure IPS view-map in Fortinet's FortiOS and FortiGate.
* `fortios_log_custom_field` Configure custom log fields in Fortinet's FortiOS and FortiGate.
* `fortios_log_disk_filter` Configure filters for local disk logging. Use these filters to determine the log messages to record according to severity and type in Fortinet's FortiOS and FortiGate.
* `fortios_log_disk_setting` Settings for local disk logging in Fortinet's FortiOS and FortiGate.
* `fortios_log_eventfilter` Configure log event filters in Fortinet's FortiOS and FortiGate.
* `fortios_log_fact` Retrieve Log Data of Fortios Log Objects.
* `fortios_log_fortianalyzer2_filter` Filters for FortiAnalyzer in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer2_override_filter` Override filters for FortiAnalyzer in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer2_override_setting` Override FortiAnalyzer settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer2_setting` Global FortiAnalyzer settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer3_filter` Filters for FortiAnalyzer in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer3_override_filter` Override filters for FortiAnalyzer in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer3_override_setting` Override FortiAnalyzer settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer3_setting` Global FortiAnalyzer settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_cloud_filter` Filters for FortiAnalyzer Cloud in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_cloud_override_filter` Override filters for FortiAnalyzer Cloud in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_cloud_override_setting` Override FortiAnalyzer Cloud settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_cloud_setting` Global FortiAnalyzer Cloud settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_filter` Filters for FortiAnalyzer in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_override_filter` Override filters for FortiAnalyzer in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_override_setting` Override FortiAnalyzer settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortianalyzer_setting` Global FortiAnalyzer settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortiguard_filter` Filters for FortiCloud in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortiguard_override_filter` Override filters for FortiCloud in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortiguard_override_setting` Override global FortiCloud logging settings for this VDOM in Fortinet's FortiOS and FortiGate.
* `fortios_log_fortiguard_setting` Configure logging to FortiCloud in Fortinet's FortiOS and FortiGate.
* `fortios_log_gui_display` Configure how log messages are displayed on the GUI in Fortinet's FortiOS and FortiGate.
* `fortios_log_memory_filter` Filters for memory buffer in Fortinet's FortiOS and FortiGate.
* `fortios_log_memory_global_setting` Global settings for memory logging in Fortinet's FortiOS and FortiGate.
* `fortios_log_memory_setting` Settings for memory buffer in Fortinet's FortiOS and FortiGate.
* `fortios_log_null_device_filter` Filters for null device logging in Fortinet's FortiOS and FortiGate.
* `fortios_log_null_device_setting` Settings for null device logging in Fortinet's FortiOS and FortiGate.
* `fortios_log_setting` Configure general log settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd2_filter` Filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd2_override_filter` Override filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd2_override_setting` Override settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd2_setting` Global settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd3_filter` Filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd3_override_filter` Override filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd3_override_setting` Override settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd3_setting` Global settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd4_filter` Filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd4_override_filter` Override filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd4_override_setting` Override settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd4_setting` Global settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd_filter` Filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd_override_filter` Override filters for remote system server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd_override_setting` Override settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_syslogd_setting` Global settings for remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_log_tacacsplusaccounting2_filter` Settings for TACACS+ accounting events filter in Fortinet's FortiOS and FortiGate.
* `fortios_log_tacacsplusaccounting2_setting` Settings for TACACS+ accounting in Fortinet's FortiOS and FortiGate.
* `fortios_log_tacacsplusaccounting3_filter` Settings for TACACS+ accounting events filter in Fortinet's FortiOS and FortiGate.
* `fortios_log_tacacsplusaccounting3_setting` Settings for TACACS+ accounting in Fortinet's FortiOS and FortiGate.
* `fortios_log_tacacsplusaccounting_filter` Settings for TACACS+ accounting events filter in Fortinet's FortiOS and FortiGate.
* `fortios_log_tacacsplusaccounting_setting` Settings for TACACS+ accounting in Fortinet's FortiOS and FortiGate.
* `fortios_log_threat_weight` Configure threat weight settings in Fortinet's FortiOS and FortiGate.
* `fortios_log_webtrends_filter` Filters for WebTrends in Fortinet's FortiOS and FortiGate.
* `fortios_log_webtrends_setting` Settings for WebTrends in Fortinet's FortiOS and FortiGate.
* `fortios_monitor` Ansible Module for FortiOS Monitor API.
* `fortios_monitor_fact` Retrieve Facts of FortiOS Monitor Objects.
* `fortios_monitoring_np6_ipsec_engine` Configure NP6 IPsec engine status monitoring in Fortinet's FortiOS and FortiGate.
* `fortios_monitoring_npu_hpe` Configure npu-hpe status monitoring in Fortinet's FortiOS and FortiGate.
* `fortios_nsxt_service_chain` Configure NSX-T service chain in Fortinet's FortiOS and FortiGate.
* `fortios_nsxt_setting` Configure NSX-T setting in Fortinet's FortiOS and FortiGate.
* `fortios_pfcp_message_filter` Message filter for PFCP messages in Fortinet's FortiOS and FortiGate.
* `fortios_report_chart` Report chart widget configuration in Fortinet's FortiOS and FortiGate.
* `fortios_report_dataset` Report dataset configuration in Fortinet's FortiOS and FortiGate.
* `fortios_report_layout` Report layout configuration in Fortinet's FortiOS and FortiGate.
* `fortios_report_setting` Report setting configuration in Fortinet's FortiOS and FortiGate.
* `fortios_report_style` Report style configuration in Fortinet's FortiOS and FortiGate.
* `fortios_report_theme` Report themes configuratio in Fortinet's FortiOS and FortiGate.
* `fortios_router_access_list6` Configure IPv6 access lists in Fortinet's FortiOS and FortiGate.
* `fortios_router_access_list` Configure access lists in Fortinet's FortiOS and FortiGate.
* `fortios_router_aspath_list` Configure Autonomous System (AS) path lists in Fortinet's FortiOS and FortiGate.
* `fortios_router_auth_path` Configure authentication based routing in Fortinet's FortiOS and FortiGate.
* `fortios_router_bfd6` Configure IPv6 BFD in Fortinet's FortiOS and FortiGate.
* `fortios_router_bfd` Configure BFD in Fortinet's FortiOS and FortiGate.
* `fortios_router_bgp` Configure BGP in Fortinet's FortiOS and FortiGate.
* `fortios_router_community_list` Configure community lists in Fortinet's FortiOS and FortiGate.
* `fortios_router_isis` Configure IS-IS in Fortinet's FortiOS and FortiGate.
* `fortios_router_key_chain` Configure key-chain in Fortinet's FortiOS and FortiGate.
* `fortios_router_multicast6` Configure IPv6 multicast in Fortinet's FortiOS and FortiGate.
* `fortios_router_multicast` Configure router multicast in Fortinet's FortiOS and FortiGate.
* `fortios_router_multicast_flow` Configure multicast-flow in Fortinet's FortiOS and FortiGate.
* `fortios_router_ospf6` Configure IPv6 OSPF in Fortinet's FortiOS and FortiGate.
* `fortios_router_ospf` Configure OSPF in Fortinet's FortiOS and FortiGate.
* `fortios_router_policy6` Configure IPv6 routing policies in Fortinet's FortiOS and FortiGate.
* `fortios_router_policy` Configure IPv4 routing policies in Fortinet's FortiOS and FortiGate.
* `fortios_router_prefix_list6` Configure IPv6 prefix lists in Fortinet's FortiOS and FortiGate.
* `fortios_router_prefix_list` Configure IPv4 prefix lists in Fortinet's FortiOS and FortiGate.
* `fortios_router_rip` Configure RIP in Fortinet's FortiOS and FortiGate.
* `fortios_router_ripng` Configure RIPng in Fortinet's FortiOS and FortiGate.
* `fortios_router_route_map` Configure route maps in Fortinet's FortiOS and FortiGate.
* `fortios_router_setting` Configure router settings in Fortinet's FortiOS and FortiGate.
* `fortios_router_static6` Configure IPv6 static routing tables in Fortinet's FortiOS and FortiGate.
* `fortios_router_static` Configure IPv4 static routing tables in Fortinet's FortiOS and FortiGate.
* `fortios_sctp_filter_profile` Configure SCTP filter profiles in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_bwl` Configure anti-spam black/white list in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_bword` Configure AntiSpam banned word list in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_dnsbl` Configure AntiSpam DNSBL/ORBL in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_fortishield` Configure FortiGuard - AntiSpam in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_iptrust` Configure AntiSpam IP trust in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_mheader` Configure AntiSpam MIME header in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_options` Configure AntiSpam options in Fortinet's FortiOS and FortiGate.
* `fortios_spamfilter_profile` Configure AntiSpam profiles in Fortinet's FortiOS and FortiGate.
* `fortios_ssh_filter_profile` Configure SSH filter profile in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_802_1x_settings` Configure global 802.1X settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_auto_config_custom` Policies which can override the 'default' for specific ISL/ICL/FortiLink interface in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_auto_config_default` Policies which are applied automatically to all ISL/ICL/FortiLink interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_auto_config_policy` Policy definitions which can define the behavior on auto configured interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_custom_command` Configure the FortiGate switch controller to send custom commands to managed FortiSwitch devices in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_dynamic_port_policy` Configure Dynamic port policy to be applied on the managed FortiSwitch ports through DPP device in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_flow_tracking` Configure FortiSwitch flow tracking and export via ipfix/netflow in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_fortilink_settings` Configure integrated FortiLink settings for FortiSwitch in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_global` Configure FortiSwitch global settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_igmp_snooping` Configure FortiSwitch IGMP snooping global settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_initial_config_template` Configure template for auto-generated VLANs in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_initial_config_vlans` Configure initial template for auto-generated VLAN interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_lldp_profile` Configure FortiSwitch LLDP profiles in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_lldp_settings` Configure FortiSwitch LLDP settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_location` Configure FortiSwitch location services in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_mac_policy` Configure MAC policy to be applied on the managed FortiSwitch devices through NAC device in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_mac_sync_settings` Configure global MAC synchronization settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_managed_switch` Configure FortiSwitch devices that are managed by this FortiGate in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_nac_device` Configure/list NAC devices learned on the managed FortiSwitch ports which matches NAC policy in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_nac_settings` Configure integrated NAC settings for FortiSwitch in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_network_monitor_settings` Configure network monitor settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_poe` List PoE end-points status in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_port_policy` Configure port policy to be applied on the managed FortiSwitch ports through NAC device in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_ptp_policy` PTP policy configuration in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_ptp_settings` Global PTP settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_qos_dot1p_map` Configure FortiSwitch QoS 802.1p in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_qos_ip_dscp_map` Configure FortiSwitch QoS IP precedence/DSCP in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_qos_qos_policy` Configure FortiSwitch QoS policy in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_qos_queue_policy` Configure FortiSwitch QoS egress queue policy in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_quarantine` Configure FortiSwitch quarantine support in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_remote_log` Configure logging by FortiSwitch device to a remote syslog server in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_security_policy_802_1x` Configure 802.1x MAC Authentication Bypass (MAB) policies in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_security_policy_captive_portal` Names of VLANs that use captive portal authentication in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_security_policy_local_access` Configure allowaccess list for mgmt and internal interfaces on managed FortiSwitch units in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_sflow` Configure FortiSwitch sFlow in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_snmp_community` Configure FortiSwitch SNMP v1/v2c communities globally in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_snmp_sysinfo` Configure FortiSwitch SNMP system information globally in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_snmp_trap_threshold` Configure FortiSwitch SNMP trap threshold values globally in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_snmp_user` Configure FortiSwitch SNMP v3 users globally in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_storm_control` Configure FortiSwitch storm control in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_storm_control_policy` Configure FortiSwitch storm control policy to be applied on managed-switch ports in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_stp_instance` Configure FortiSwitch multiple spanning tree protocol (MSTP) instances in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_stp_settings` Configure FortiSwitch spanning tree protocol (STP) in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_switch_group` Configure FortiSwitch switch groups in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_switch_interface_tag` Configure switch object tags in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_switch_log` Configure FortiSwitch logging (logs are transferred to and inserted into FortiGate event log) in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_switch_profile` Configure FortiSwitch switch profile in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_system` Configure system-wide switch controller settings in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_traffic_policy` Configure FortiSwitch traffic policy in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_traffic_sniffer` Configure FortiSwitch RSPAN/ERSPAN traffic sniffing parameters in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_virtual_port_pool` Configure virtual pool in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_vlan` Configure VLANs for switch controller in Fortinet's FortiOS and FortiGate.
* `fortios_switch_controller_vlan_policy` Configure VLAN policy to be applied on the managed FortiSwitch ports through dynamic-port-policy in Fortinet's FortiOS and FortiGate.
* `fortios_system_3g_modem_custom` 3G MODEM custom in Fortinet's FortiOS and FortiGate.
* `fortios_system_accprofile` Configure access profiles for system administrators in Fortinet's FortiOS and FortiGate.
* `fortios_system_acme` Configure ACME client in Fortinet's FortiOS and FortiGate.
* `fortios_system_admin` Configure admin users in Fortinet's FortiOS and FortiGate.
* `fortios_system_affinity_interrupt` Configure interrupt affinity in Fortinet's FortiOS and FortiGate.
* `fortios_system_affinity_packet_redistribution` Configure packet redistribution in Fortinet's FortiOS and FortiGate.
* `fortios_system_alarm` Configure alarm in Fortinet's FortiOS and FortiGate.
* `fortios_system_alias` Configure alias command in Fortinet's FortiOS and FortiGate.
* `fortios_system_api_user` Configure API users in Fortinet's FortiOS and FortiGate.
* `fortios_system_arp_table` Configure ARP table in Fortinet's FortiOS and FortiGate.
* `fortios_system_auto_install` Configure USB auto installation in Fortinet's FortiOS and FortiGate.
* `fortios_system_automation_action` Action for automation stitches in Fortinet's FortiOS and FortiGate.
* `fortios_system_automation_destination` Automation destinations in Fortinet's FortiOS and FortiGate.
* `fortios_system_automation_stitch` Automation stitches in Fortinet's FortiOS and FortiGate.
* `fortios_system_automation_trigger` Trigger for automation stitches in Fortinet's FortiOS and FortiGate.
* `fortios_system_auto_script` Configure auto script in Fortinet's FortiOS and FortiGate.
* `fortios_system_autoupdate_push_update` Configure push updates in Fortinet's FortiOS and FortiGate.
* `fortios_system_autoupdate_schedule` Configure update schedule in Fortinet's FortiOS and FortiGate.
* `fortios_system_autoupdate_tunneling` Configure web proxy tunneling for the FDN in Fortinet's FortiOS and FortiGate.
* `fortios_system_central_management` Configure central management in Fortinet's FortiOS and FortiGate.
* `fortios_system_cluster_sync` Configure FortiGate Session Life Support Protocol (FGSP) session synchronization in Fortinet's FortiOS and FortiGate.
* `fortios_system_console` Configure console in Fortinet's FortiOS and FortiGate.
* `fortios_system_csf` Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate in Fortinet's FortiOS and FortiGate.
* `fortios_system_custom_language` Configure custom languages in Fortinet's FortiOS and FortiGate.
* `fortios_system_ddns` Configure DDNS in Fortinet's FortiOS and FortiGate.
* `fortios_system_dedicated_mgmt` Configure dedicated management in Fortinet's FortiOS and FortiGate.
* `fortios_system_dhcp6_server` Configure DHCPv6 servers in Fortinet's FortiOS and FortiGate.
* `fortios_system_dhcp_server` Configure DHCP servers in Fortinet's FortiOS and FortiGate.
* `fortios_system_dns64` Configure DNS64 in Fortinet's FortiOS and FortiGate.
* `fortios_system_dns` Configure DNS in Fortinet's FortiOS and FortiGate.
* `fortios_system_dns_database` Configure DNS databases in Fortinet's FortiOS and FortiGate.
* `fortios_system_dns_server` Configure DNS servers in Fortinet's FortiOS and FortiGate.
* `fortios_system_dscp_based_priority` Configure DSCP based priority table in Fortinet's FortiOS and FortiGate.
* `fortios_system_email_server` Configure the email server used by the FortiGate various things. For example, for sending email messages to users to support user authentication features in Fortinet's FortiOS and FortiGate.
* `fortios_system_external_resource` Configure external resource in Fortinet's FortiOS and FortiGate.
* `fortios_system_federated_upgrade` Coordinate federated upgrades within the Security Fabric in Fortinet's FortiOS and FortiGate.
* `fortios_system_fips_cc` Configure FIPS-CC mode in Fortinet's FortiOS and FortiGate.
* `fortios_system_fm` Configure FM in Fortinet's FortiOS and FortiGate.
* `fortios_system_fortiai` Configure FortiAI in Fortinet's FortiOS and FortiGate.
* `fortios_system_fortiguard` Configure FortiGuard services in Fortinet's FortiOS and FortiGate.
* `fortios_system_fortimanager` Configure FortiManager in Fortinet's FortiOS and FortiGate.
* `fortios_system_fortindr` Configure FortiNDR in Fortinet's FortiOS and FortiGate.
* `fortios_system_fortisandbox` Configure FortiSandbox in Fortinet's FortiOS and FortiGate.
* `fortios_system_fsso_polling` Configure Fortinet Single Sign On (FSSO) server in Fortinet's FortiOS and FortiGate.
* `fortios_system_ftm_push` Configure FortiToken Mobile push services in Fortinet's FortiOS and FortiGate.
* `fortios_system_geneve` Configure GENEVE devices in Fortinet's FortiOS and FortiGate.
* `fortios_system_geoip_country` Define geoip country name-ID table in Fortinet's FortiOS and FortiGate.
* `fortios_system_geoip_override` Configure geographical location mapping for IP address(es) to override mappings from FortiGuard in Fortinet's FortiOS and FortiGate.
* `fortios_system_gi_gk` Configure Gi Firewall Gatekeeper in Fortinet's FortiOS and FortiGate.
* `fortios_system_global` Configure global attributes in Fortinet's FortiOS and FortiGate.
* `fortios_system_gre_tunnel` Configure GRE tunnel in Fortinet's FortiOS and FortiGate.
* `fortios_system_ha` Configure HA in Fortinet's FortiOS and FortiGate.
* `fortios_system_ha_monitor` Configure HA monitor in Fortinet's FortiOS and FortiGate.
* `fortios_system_ike` Configure IKE global attributes in Fortinet's FortiOS and FortiGate.
* `fortios_system_interface` Configure interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_system_ipam` Configure IP address management services in Fortinet's FortiOS and FortiGate.
* `fortios_system_ipip_tunnel` Configure IP in IP Tunneling in Fortinet's FortiOS and FortiGate.
* `fortios_system_ips` Configure IPS system settings in Fortinet's FortiOS and FortiGate.
* `fortios_system_ipsec_aggregate` Configure an aggregate of IPsec tunnels in Fortinet's FortiOS and FortiGate.
* `fortios_system_ips_urlfilter_dns6` Configure IPS URL filter IPv6 DNS servers in Fortinet's FortiOS and FortiGate.
* `fortios_system_ips_urlfilter_dns` Configure IPS URL filter DNS servers in Fortinet's FortiOS and FortiGate.
* `fortios_system_ipv6_neighbor_cache` Configure IPv6 neighbor cache table in Fortinet's FortiOS and FortiGate.
* `fortios_system_ipv6_tunnel` Configure IPv6/IPv4 in IPv6 tunnel in Fortinet's FortiOS and FortiGate.
* `fortios_system_isf_queue_profile` Create a queue profile of switch in Fortinet's FortiOS and FortiGate.
* `fortios_system_link_monitor` Configure Link Health Monitor in Fortinet's FortiOS and FortiGate.
* `fortios_system_lldp_network_policy` Configure LLDP network policy in Fortinet's FortiOS and FortiGate.
* `fortios_system_lte_modem` Configure USB LTE/WIMAX devices in Fortinet's FortiOS and FortiGate.
* `fortios_system_mac_address_table` Configure MAC address tables in Fortinet's FortiOS and FortiGate.
* `fortios_system_management_tunnel` Management tunnel configuration in Fortinet's FortiOS and FortiGate.
* `fortios_system_mem_mgr` Configure memory manager in Fortinet's FortiOS and FortiGate.
* `fortios_system_mobile_tunnel` Configure Mobile tunnels, an implementation of Network Mobility (NEMO) extensions for Mobile IPv4 RFC5177 in Fortinet's FortiOS and FortiGate.
* `fortios_system_modem` Configure MODEM in Fortinet's FortiOS and FortiGate.
* `fortios_system_nat64` Configure NAT64 in Fortinet's FortiOS and FortiGate.
* `fortios_system_nd_proxy` Configure IPv6 neighbor discovery proxy (RFC4389) in Fortinet's FortiOS and FortiGate.
* `fortios_system_netflow` Configure NetFlow in Fortinet's FortiOS and FortiGate.
* `fortios_system_network_visibility` Configure network visibility settings in Fortinet's FortiOS and FortiGate.
* `fortios_system_np6` Configure NP6 attributes in Fortinet's FortiOS and FortiGate.
* `fortios_system_npu` Configure NPU attributes in Fortinet's FortiOS and FortiGate.
* `fortios_system_ntp` Configure system NTP information in Fortinet's FortiOS and FortiGate.
* `fortios_system_object_tagging` Configure object tagging in Fortinet's FortiOS and FortiGate.
* `fortios_system_password_policy` Configure password policy for locally defined administrator passwords and IPsec VPN pre-shared keys in Fortinet's FortiOS and FortiGate.
* `fortios_system_password_policy_guest_admin` Configure the password policy for guest administrators in Fortinet's FortiOS and FortiGate.
* `fortios_system_performance_top` Display information about the top CPU processes in Fortinet's FortiOS and FortiGate.
* `fortios_system_physical_switch` Configure physical switches in Fortinet's FortiOS and FortiGate.
* `fortios_system_pppoe_interface` Configure the PPPoE interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_system_probe_response` Configure system probe response in Fortinet's FortiOS and FortiGate.
* `fortios_system_proxy_arp` Configure proxy-ARP in Fortinet's FortiOS and FortiGate.
* `fortios_system_ptp` Configure system PTP information in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_admin` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_alertmail` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_auth` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_automation` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_device_detection_portal` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_ec` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_fortiguard_wf` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_ftp` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_group` Configure replacement message groups in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_http` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_icap` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_image` Configure replacement message images in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_mail` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_mm1` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_mm3` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_mm4` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_mm7` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_mms` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_nac_quar` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_nntp` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_spam` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_sslvpn` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_traffic_quota` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_utm` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_replacemsg_webproxy` Replacement messages in Fortinet's FortiOS and FortiGate.
* `fortios_system_resource_limits` Configure resource limits in Fortinet's FortiOS and FortiGate.
* `fortios_system_saml` Global settings for SAML authentication in Fortinet's FortiOS and FortiGate.
* `fortios_system_sdn_connector` Configure connection to SDN Connector in Fortinet's FortiOS and FortiGate.
* `fortios_system_sdwan` Configure redundant Internet connections with multiple outbound links and health-check profiles in Fortinet's FortiOS and FortiGate.
* `fortios_system_session_helper` Configure session helper in Fortinet's FortiOS and FortiGate.
* `fortios_system_session_ttl` Configure global session TTL timers for this FortiGate in Fortinet's FortiOS and FortiGate.
* `fortios_system_settings` Configure VDOM settings in Fortinet's FortiOS and FortiGate.
* `fortios_system_sflow` Configure sFlow in Fortinet's FortiOS and FortiGate.
* `fortios_system_sit_tunnel` Configure IPv6 tunnel over IPv4 in Fortinet's FortiOS and FortiGate.
* `fortios_system_smc_ntp` Configure SMC NTP information in Fortinet's FortiOS and FortiGate.
* `fortios_system_sms_server` Configure SMS server for sending SMS messages to support user authentication in Fortinet's FortiOS and FortiGate.
* `fortios_system_snmp_community` SNMP community configuration in Fortinet's FortiOS and FortiGate.
* `fortios_system_snmp_mib_view` SNMP Access Control MIB View configuration in Fortinet's FortiOS and FortiGate.
* `fortios_system_snmp_sysinfo` SNMP system info configuration in Fortinet's FortiOS and FortiGate.
* `fortios_system_snmp_user` SNMP user configuration in Fortinet's FortiOS and FortiGate.
* `fortios_system_speed_test_schedule` Speed test schedule for each interface in Fortinet's FortiOS and FortiGate.
* `fortios_system_speed_test_server` Configure speed test server list in Fortinet's FortiOS and FortiGate.
* `fortios_system_sso_admin` Configure SSO admin users in Fortinet's FortiOS and FortiGate.
* `fortios_system_sso_forticloud_admin` Configure FortiCloud SSO admin users in Fortinet's FortiOS and FortiGate.
* `fortios_system_standalone_cluster` Configure FortiGate Session Life Support Protocol (FGSP) cluster attributes in Fortinet's FortiOS and FortiGate.
* `fortios_system_storage` Configure logical storage in Fortinet's FortiOS and FortiGate.
* `fortios_system_stp` Configure Spanning Tree Protocol (STP) in Fortinet's FortiOS and FortiGate.
* `fortios_system_switch_interface` Configure software switch interfaces by grouping physical and WiFi interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_system_tos_based_priority` Configure Type of Service (ToS) based priority table to set network traffic priorities in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom` Configure virtual domain in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_dns` Configure DNS servers for a non-management VDOM in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_exception` Global configuration objects that can be configured independently across different ha peers for all VDOMs or for the defined VDOM scope in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_link` Configure VDOM links in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_netflow` Configure NetFlow per VDOM in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_property` Configure VDOM property in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_radius_server` Configure a RADIUS server to use as a RADIUS Single Sign On (RSSO) server for this VDOM in Fortinet's FortiOS and FortiGate.
* `fortios_system_vdom_sflow` Configure sFlow per VDOM to add or change the IP address and UDP port that FortiGate sFlow agents in this VDOM use to send sFlow datagrams to an sFlow collector in Fortinet's FortiOS and FortiGate.
* `fortios_system_virtual_switch` Configure virtual hardware switch interfaces in Fortinet's FortiOS and FortiGate.
* `fortios_system_virtual_wan_link` Configure redundant internet connections using SD-WAN (formerly virtual WAN link) in Fortinet's FortiOS and FortiGate.
* `fortios_system_virtual_wire_pair` Configure virtual wire pairs in Fortinet's FortiOS and FortiGate.
* `fortios_system_vne_tunnel` Configure virtual network enabler tunnel in Fortinet's FortiOS and FortiGate.
* `fortios_system_vxlan` Configure VXLAN devices in Fortinet's FortiOS and FortiGate.
* `fortios_system_wccp` Configure WCCP in Fortinet's FortiOS and FortiGate.
* `fortios_system_zone` Configure zones to group two or more interfaces. When a zone is created you can configure policies for the zone instead of individual interfaces in the zone in Fortinet's FortiOS and FortiGate.
* `fortios_user_adgrp` Configure FSSO groups in Fortinet's FortiOS and FortiGate.
* `fortios_user_certificate` Configure certificate users in Fortinet's FortiOS and FortiGate.
* `fortios_user_device_access_list` Configure device access control lists in Fortinet's FortiOS and FortiGate.
* `fortios_user_device_category` Configure device categories in Fortinet's FortiOS and FortiGate.
* `fortios_user_device` Configure devices in Fortinet's FortiOS and FortiGate.
* `fortios_user_device_group` Configure device groups in Fortinet's FortiOS and FortiGate.
* `fortios_user_domain_controller` Configure domain controller entries in Fortinet's FortiOS and FortiGate.
* `fortios_user_exchange` Configure MS Exchange server entries in Fortinet's FortiOS and FortiGate.
* `fortios_user_fortitoken` Configure FortiToken in Fortinet's FortiOS and FortiGate.
* `fortios_user_fsso` Configure Fortinet Single Sign On (FSSO) agents in Fortinet's FortiOS and FortiGate.
* `fortios_user_fsso_polling` Configure FSSO active directory servers for polling mode in Fortinet's FortiOS and FortiGate.
* `fortios_user_group` Configure user groups in Fortinet's FortiOS and FortiGate.
* `fortios_user_krb_keytab` Configure Kerberos keytab entries in Fortinet's FortiOS and FortiGate.
* `fortios_user_ldap` Configure LDAP server entries in Fortinet's FortiOS and FortiGate.
* `fortios_user_local` Configure local users in Fortinet's FortiOS and FortiGate.
* `fortios_user_nac_policy` Configure NAC policy matching pattern to identify matching NAC devices in Fortinet's FortiOS and FortiGate.
* `fortios_user_password_policy` Configure user password policy in Fortinet's FortiOS and FortiGate.
* `fortios_user_peer` Configure peer users in Fortinet's FortiOS and FortiGate.
* `fortios_user_peergrp` Configure peer groups in Fortinet's FortiOS and FortiGate.
* `fortios_user_pop3` POP3 server entry configuration in Fortinet's FortiOS and FortiGate.
* `fortios_user_quarantine` Configure quarantine support in Fortinet's FortiOS and FortiGate.
* `fortios_user_radius` Configure RADIUS server entries in Fortinet's FortiOS and FortiGate.
* `fortios_user_saml` SAML server entry configuration in Fortinet's FortiOS and FortiGate.
* `fortios_user_security_exempt_list` Configure security exemption list in Fortinet's FortiOS and FortiGate.
* `fortios_user_setting` Configure user authentication setting in Fortinet's FortiOS and FortiGate.
* `fortios_user_tacacsplus` Configure TACACS+ server entries in Fortinet's FortiOS and FortiGate.
* `fortios_videofilter_profile` Configure VideoFilter profile in Fortinet's FortiOS and FortiGate.
* `fortios_videofilter_youtube_channel_filter` Configure YouTube channel filter in Fortinet's FortiOS and FortiGate.
* `fortios_videofilter_youtube_key` Configure YouTube API keys in Fortinet's FortiOS and FortiGate.
* `fortios_voip_profile` Configure VoIP profiles in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_certificate_ca` CA certificate in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_certificate_crl` Certificate Revocation List as a PEM file in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_certificate_local` Local keys and certificates in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_certificate_ocsp_server` OCSP server configuration in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_certificate_remote` Remote certificate as a PEM file in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_certificate_setting` VPN certificate setting in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ike_gateway` List gateways in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_concentrator` Concentrator configuration in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_fec` Configure Forward Error Correction (FEC) mapping profiles in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_forticlient` Configure FortiClient policy realm in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_manualkey` Configure IPsec manual keys in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_manualkey_interface` Configure IPsec manual keys in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_phase1` Configure VPN remote gateway in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_phase1_interface` Configure VPN remote gateway in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_phase2` Configure VPN autokey tunnel in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ipsec_phase2_interface` Configure VPN autokey tunnel in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_l2tp` Configure L2TP in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ocvpn` Configure Overlay Controller VPN settings in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_pptp` Configure PPTP in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_client` Client in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_settings` Configure SSL-VPN in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_web_host_check_software` SSL-VPN host check software in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_web_portal` Portal in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_web_realm` Realm in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_web_user_bookmark` Configure SSL-VPN user bookmark in Fortinet's FortiOS and FortiGate.
* `fortios_vpn_ssl_web_user_group_bookmark` Configure SSL-VPN user group bookmark in Fortinet's FortiOS and FortiGate.
* `fortios_waf_main_class` Hidden table for datasource in Fortinet's FortiOS and FortiGate.
* `fortios_waf_profile` Configure Web application firewall configuration in Fortinet's FortiOS and FortiGate.
* `fortios_waf_signature` Hidden table for datasource in Fortinet's FortiOS and FortiGate.
* `fortios_waf_sub_class` Hidden table for datasource in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_auth_group` Configure WAN optimization authentication groups in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_cache_service` Designate cache-service for wan-optimization and webcache in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_content_delivery_network_rule` Configure WAN optimization content delivery network rules in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_peer` Configure WAN optimization peers in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_profile` Configure WAN optimization profiles in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_remote_storage` Configure a remote cache device as Web cache storage in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_settings` Configure WAN optimization settings in Fortinet's FortiOS and FortiGate.
* `fortios_wanopt_webcache` Configure global Web cache settings in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_content` Configure Web filter banned word table in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_content_header` Configure content types used by Web filter in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_fortiguard` Configure FortiGuard Web Filter service in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_ftgd_local_cat` Configure FortiGuard Web Filter local categories in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_ftgd_local_rating` Configure local FortiGuard Web Filter local ratings in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_ips_urlfilter_cache_setting` Configure IPS URL filter cache settings in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_ips_urlfilter_setting6` Configure IPS URL filter settings for IPv6 in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_ips_urlfilter_setting` Configure IPS URL filter settings in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_override` Configure FortiGuard Web Filter administrative overrides in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_profile` Configure Web filter profiles in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_search_engine` Configure web filter search engines in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_status` Display rating info in Fortinet's FortiOS and FortiGate.
* `fortios_webfilter_urlfilter` Configure URL filter lists in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_debug_url` Configure debug URL addresses in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_explicit` Configure explicit Web proxy settings in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_forward_server` Configure forward-server addresses in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_forward_server_group` Configure a forward server group consisting or multiple forward servers. Supports failover and load balancing in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_global` Configure Web proxy global settings in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_profile` Configure web proxy profiles in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_url_match` Exempt URLs from web proxy forwarding and caching in Fortinet's FortiOS and FortiGate.
* `fortios_web_proxy_wisp` Configure Websense Integrated Services Protocol (WISP) servers in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_access_control_list` Configure WiFi bridge access control list in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_address` Configure the client with its MAC address in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_addrgrp` Configure the MAC address group in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_apcfg_profile` Configure AP local configuration profiles in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_ap_status` Configure access point status (rogue | accepted | suppressed) in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_arrp_profile` Configure WiFi Automatic Radio Resource Provisioning (ARRP) profiles in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_ble_profile` Configure Bluetooth Low Energy profile in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_bonjour_profile` Configure Bonjour profiles. Bonjour is Apple's zero configuration networking protocol. Bonjour profiles allow APs and FortiAPs to connnect to networks using Bonjour in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_client_info` Wireless controller client-info in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_global` Configure wireless controller global settings in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_3gpp_cellular` Configure 3GPP public land mobile network (PLMN) in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_ip_address_type` Configure IP address type availability in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_nai_realm` Configure network access identifier (NAI) realm in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_network_auth_type` Configure network authentication type in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_roaming_consortium` Configure roaming consortium in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_venue_name` Configure venue name duple in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_anqp_venue_url` Configure venue URL in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_advice_of_charge` Configure advice of charge in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_conn_capability` Configure connection capability in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_operator_name` Configure operator friendly name in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_osu_provider` Configure online sign up (OSU) provider list in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_osu_provider_nai` Configure online sign up (OSU) provider NAI list in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_terms_and_conditions` Configure terms and conditions in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_h2qp_wan_metric` Configure WAN metrics in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_hs_profile` Configure hotspot profile in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_icon` Configure OSU provider icon in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_hotspot20_qos_map` Configure QoS map set in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_inter_controller` Configure inter wireless controller operation in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_log` Configure wireless controller event log filters in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_mpsk_profile` Configure MPSK profile in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_nac_profile` Configure WiFi network access control (NAC) profiles in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_qos_profile` Configure WiFi quality of service (QoS) profiles in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_region` Configure FortiAP regions (for floor plans and maps) in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_rf_analysis` Wireless controller rf-analysis in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_setting` VDOM wireless controller configuration in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_snmp` Configure SNMP in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_spectral_info` Wireless controller spectrum analysis in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_ssid_policy` Configure WiFi SSID policies in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_status` Wireless controller status in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_syslog_profile` Configure Wireless Termination Points (WTP) system log server profile in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_timers` Configure CAPWAP timers in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_utm_profile` Configure UTM (Unified Threat Management) profile in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_vap` Configure Virtual Access Points (VAPs) in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_vap_group` Configure virtual Access Point (VAP) groups in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_vap_status` Wireless controller VAP-status in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_wag_profile` Configure wireless access gateway (WAG) profiles used for tunnels on AP in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_wids_profile` Configure wireless intrusion detection system (WIDS) profiles in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_wtp` Configure Wireless Termination Points (WTPs), that is, FortiAPs or APs to be managed by FortiGate in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_wtp_group` Configure WTP groups in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_wtp_profile` Configure WTP profiles or FortiAP profiles that define radio settings for manageable FortiAP platforms in Fortinet's FortiOS and FortiGate.
* `fortios_wireless_controller_wtp_status` Wireless controller WTP-status in Fortinet's FortiOS and FortiGate.
## Roles
## Usage
The following example is used to configure global attributes in Fortinet's FortiOS and FortiGate.
Create `fw_global_set.yml` with the following template:
```yaml
---
- hosts: fortigates
collections:
- fortinet.fortios
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
tasks:
- name: Configure global attributes.
fortios_system_global:
vdom: "{{ vdom }}"
system_global:
admintimeout: "23"
hostname: "FortiGate02"
```
Create the `hosts` inventory file
```
[fortigates]
fortigate01 ansible_host=192.168.190.100 ansible_user="admin" ansible_password="password"
[fortigates:vars]
ansible_network_os=fortinet.fortios.fortios
```
Run the test:
```bash
ansible-playbook -i hosts fw_global_set.yml
```
This will configure the firewall's hostname and admin timeout.

View File

@@ -0,0 +1,26 @@
objects:
role: {}
plugins:
become: {}
cache: {}
callback: {}
cliconf: {}
connection: {}
httpapi:
fortios:
description: HttpApi Plugin for Fortinet FortiOS Appliance or VM
name: fortios
version_added: 2.0.0
inventory: {}
lookup: {}
module:
fortios_json_generic:
description: Config Fortinet's FortiOS and FortiGate with json generic method.
name: fortios_json_generic
namespace: ''
version_added: 2.0.0
netconf: {}
shell: {}
strategy: {}
vars: {}
version: 2.1.7

View File

@@ -0,0 +1,184 @@
ancestor: null
releases:
2.0.0:
changes:
breaking_changes:
- Generic FortiOS Module - FOS module to issue generic request with Ansible.
- Support for FOS Monitor API - several modules are new for monitor API.
- Unified Collection - The fortios collection itself will be adapting any FOS
platforms.
bugfixes:
- Deprecated second-layer state module parameter
- enable_log - Explicit logging option.
known_issues:
- Modules for monitor API are not versioned yet.
major_changes:
- New module fortios_configuration_fact
- New module fortios_json_generic
- New module fortios_monitor
- New module fortios_monitor_fact
release_summary: The major breaking release of FOS 2.x collections.
removed_features:
- Removed module fortios_facts
- Removed module fortios_registration_forticare
- Removed module fortios_registration_vdom
- Removed module fortios_system_config_backup_restore
- Removed module fortios_system_vmlicense
fragments:
- overall.yml
release_date: '2021-04-05'
2.0.1:
changes:
minor_changes:
- fixed pylint testing errors.
fragments:
- 2.0.1.yml
release_date: '2021-04-07'
2.0.2:
changes:
bugfixes:
- Fix the authorization fails at log in with username and password in FOS7.0.
- Github Issue 103
- Github Issue 105
major_changes:
- Improve ``fortios_configuration_fact`` to use multiple selectors concurrently.
- Support ``check_mode`` in all cofigurationAPI-based modules.
- Support filtering for fact gathering modules ``fortios_configuration_fact``
and ``fortios_monitor_fact``.
- Support moving policy in ``firewall_central_snat_map``.
- Unify schemas for monitor API.
release_summary: patch release of 2.0.2
fragments:
- release_2.0.2.yml
release_date: '2021-05-14'
2.1.0:
changes:
bugfixes:
- Disable check_mode feature from all global objects of configuration modules
due to 'state' issue.
- Fix a bug in IP_PREFIX.match().
- Fix the issue that the ``server_type`` is not updated in ``fortios_system_central_management``.
- Fix the unexpected warning caused by optinal params in ``fortios_monitor_fact``
and ``fortios_monitor``.
major_changes:
- New module fortios_monitor_fact.
- Support Fortios 7.0.
- Support Log APIs.
release_summary: minor release of 2.1.0
fragments:
- release_2.1.0.yml
release_date: '2021-06-25'
2.1.1:
changes:
bugfixes:
- Fix the KeyError caused by non-required multi-value attributes in an object.
release_summary: patch release of 2.1.1
fragments:
- 2.1.1_release.yml
release_date: '2021-06-29'
2.1.2:
changes:
bugfixes:
- Fix a regression bug caused by non-required attributes.
- Fix an intentional exception for listed options.
release_summary: patch release of 2.1.2
fragments:
- 2.1.2_release.yml
release_date: '2021-07-15'
2.1.3:
changes:
bugfixes:
- Fix Github issue
- Fix the corner cases that response does not have status in it.
- Fix the filters error when fetching multiple facts with selectors for a configuration
module (Github issue
major_changes:
- Add real-world use cases in the example section for some configuration modules.
- Collect the current configurations of the modules and convert them into playbooks.
- Support FortiOS 7.0.1.
- Support member operation (delete/add extra members) on an object that has
a list of members in it.
- Support selectors feature in ``fortios_monitor_fact`` and ``fortios_log_fact``.
release_summary: patch release of 2.1.3
fragments:
- 2.1.3_release.yml
release_date: '2021-11-11'
2.1.4:
release_date: '2022-02-04'
2.1.5:
changes:
bugfixes:
- Fix issues in version mismatch logic.
- Fix status issue in fortios_json_generic().
- Fix the issue of inconsistent data types in different schemas.
major_changes:
- Support FortiOS 7.0.2, 7.0.3, 7.0.4, 7.0.5.
release_summary: patch release of 2.1.5
fragments:
- 2.1.5_release.yml
release_date: '2022-04-22'
2.1.6:
changes:
bugfixes:
- Add defaut value for enable_log param.
- Fix import issues in sanity-test and improve unit tests.
- Fix parameter-list-no-elements error in sanity-test.
- Fix syntax issue in python2.7.
- Fix the syntax error in the three wireless_controller_hotspot20 modules.
- Relicense the FortiOS Collection under GPLv3+.
- Update the logic in check_legacy_fortiosapi.
- Use collection version number in the doc.
release_summary: patch release of 2.1.6
fragments:
- 2.1.6_release.yml
release_date: '2022-05-20'
2.1.7:
changes:
bugfixes:
- Fix the Github Issue 187.
- Fix the Github Issue 188 and 189.
- Fix the Github Issue 190.
- Fix the Github Issue 191.
- Fix the error message in the debugging log when using ``access_token``.
- Fix the issue when filtering out parameter with space in the module ``fortios_configuration_fact``.
- Fix typo in the documentation of ``Install FortiOS Galaxy Collection``.
major_changes:
- Support Diff feature in check_mode.
- Support Fortios 7.2.0.
release_summary: patch release of 2.1.7
fragments:
- 2.1.7_release.yml
release_date: '2022-08-12'
2.2.0:
changes:
bugfixes:
- Fix issue of missing some options for monitor modules (#196);
- Fix issue of filter content could not contain spaces (#208);
- Fix list type not match issue;
major_changes:
- Support FortiOS v7.0.6, v7.0.7, v7.0.8, v7.2.1, v7.2.2.
release_summary: patch release of 2.2.0
fragments:
- 2.2.0_release.yml
release_date: '2022-11-09'
2.2.1:
changes:
bugfixes:
- Fix invalid arguments in version_schemas;
- Fix list type arguments inconsistency;
- Fix validate-modules error: type not match and name not validate;
- Fix supports_check_mode issue for _info and _facts modules;
release_summary: patch release of 2.2.1
fragments:
- 2.2.1_release.yml
release_date: '2022-12-02'
2.2.2:
changes:
bugfixes:
- Fix runtime issue (#214);
- Add required field for module log_fact;
- Fix sanity test errors in validate-modules test;
release_summary: patch release of 2.2.2
fragments:
- 2.2.2_release.yml
release_date: '2022-12-08'

View File

@@ -0,0 +1,32 @@
changelog_filename_template: ../CHANGELOG.rst
changelog_filename_version_depth: 0
changes_file: changelog.yaml
changes_format: combined
ignore_other_fragment_extensions: true
keep_fragments: false
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments
prelude_section_name: release_summary
prelude_section_title: Release Summary
sanitize_changelog: true
sections:
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
title: Fortinet.Fortios
trivial_section_name: trivial
use_fqcn: true

View File

@@ -0,0 +1,5 @@
[fortigates]
fortigate01 ansible_host=192.168.52.177 ansible_user="admin" ansible_password="admin"
[fortigates:vars]
ansible_network_os=fortinet.fortios.fortios

View File

@@ -0,0 +1,2 @@
Usage:
# ansible-playbook set_system_global.yml -i inventory/hosts

View File

@@ -0,0 +1,19 @@
---
- hosts: fortigates
collections:
- fortinet.fortios
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
tasks:
- name: Configure global attributes.
fortios_system_global:
vdom: "{{ vdom }}"
system_global:
admintimeout: "23"
hostname: "FortiGate11"
admin_lockout_threshold: "8"
admin_login_max: "9"

View File

@@ -0,0 +1,27 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure IPv4 addresses.
fortios_firewall_address:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
state: "present"
firewall_address:
allow_routing: "enable"
comment: "Comment."
name: "testfwaddr"
start_ip: "1.1.1.1"
end_ip: "1.1.1.2"
type: "iprange"

View File

@@ -0,0 +1,25 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure IPv4 address groups.
fortios_firewall_addrgrp:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
state: "present"
firewall_addrgrp:
name: "testfwgrp"
member:
-
name: "SSLVPN_TUNNEL_ADDR1"

View File

@@ -0,0 +1,27 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure virtual IP for IPv4.
fortios_firewall_vip:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
state: "present"
firewall_vip:
name: "testfwvip"
extip: "1.1.1.1-1.1.1.4"
extintf: "any"
mappedip:
-
range: "1.1.2.1-1.1.2.4"

View File

@@ -0,0 +1,23 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure alias command.
fortios_system_alias:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
state: "present"
system_alias:
name: "mytest"
command: "get system status"

View File

@@ -0,0 +1,21 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure admin users.
fortios_system_dns:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
system_dns:
primary: "2.32.2.2"

View File

@@ -0,0 +1,24 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure global attributes.
fortios_system_global:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
system_global:
admintimeout: "23"
hostname: "FortiGate11"
admin_lockout_threshold: "8"
admin_login_max: "9"

View File

@@ -0,0 +1,24 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure HA.
fortios_system_ha:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
system_ha:
group_name: "testgroup"
mode: "standalone"
multicast_ttl: "38"
override: "enable"

View File

@@ -0,0 +1,21 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure HA monitor.
fortios_system_ha_monitor:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
system_ha_monitor:
monitor_vlan: "disable"

View File

@@ -0,0 +1,22 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure system NTP information.
fortios_system_ntp:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
system_ntp:
ntpsync: "disable"
server_mode: "disable"

View File

@@ -0,0 +1,27 @@
---
- hosts: localhost
collections:
- fortinet.fortios
vars:
host: "192.168.52.177"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Configure zones to group two or more interfaces.
fortios_system_zone:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "True"
ssl_verify: "{{ ssl_verify }}"
state: "present"
system_zone:
intrazone: "allow"
name: "default_name_6"
tagging:
-
category: "default"
name: "default_name_9"

View File

@@ -0,0 +1,2 @@
---
requires_ansible: '>=2.9.10'

View File

@@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
file_mode:
description:
- Don't connect to any device, only use I(config_file) as input and Output.
type: bool
default: no
version_added: "2.4"
config_file:
description:
- Path to configuration file. Required when I(file_mode) is True.
type: path
version_added: "2.4"
host:
description:
- Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when I(file_mode) is False.
type: str
username:
description:
- Configures the username used to authenticate to the remote device. Required when I(file_mode) is True.
type: str
password:
description:
- Specifies the password used to authenticate to the remote device. Required when I(file_mode) is True.
type: str
timeout:
description:
- Timeout in seconds for connecting to the remote device.
type: int
default: 60
vdom:
description:
- Specifies on which vdom to apply configuration
type: str
backup:
description:
- This argument will cause the module to create a backup of
the current C(running-config) from the remote device before any
changes are made. The backup file is written to the i(backup)
folder.
type: bool
default: no
backup_path:
description:
- Specifies where to store backup files. Required if I(backup=yes).
type: path
backup_filename:
description:
- Specifies the backup filename. If omitted filename will be
formatted like HOST_config.YYYY-MM-DD@HH:MM:SS
type: str
'''

View File

@@ -0,0 +1,202 @@
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
---
name: fortios
short_description: HttpApi Plugin for Fortinet FortiOS Appliance or VM
description:
- This HttpApi plugin provides methods to connect to Fortinet FortiOS Appliance or VM via REST API
author:
- Miguel Angel Munoz (@magonzalez)
version_added: "2.0.0"
"""
import json
from ansible.plugins.httpapi import HttpApiBase
from ansible.module_utils.basic import to_text
from ansible.module_utils.six.moves import urllib
import re
# import requests
from datetime import datetime
class HttpApi(HttpApiBase):
def __init__(self, connection):
super(HttpApi, self).__init__(connection)
self._conn = connection
self._ccsrftoken = ''
self._system_version = None
self._ansible_fos_version = 'v6.0.0'
self._ansible_galaxy_version = '2.2.2'
self._log = None
# workaround for HttApiBase: it always tries to do a basic auth for the first request to update auth headers
# for token based auth, we need the Accept header to request the right data format
self._conn._auth = {"Accept": "application/json"}
def log(self, msg):
log_enabled = self._conn.get_option('enable_log')
if not log_enabled:
return
if not self._log:
self._log = open("/tmp/fortios.ansible.log", "a")
log_message = str(datetime.now())
log_message += ": " + str(msg) + '\n'
self._log.write(log_message)
self._log.flush()
def get_access_token(self):
'''this is only available after a module is initialized'''
token = self._conn.get_option('access_token') if 'access_token' in self._conn._options else None
return token
def set_become(self, become_context):
"""
Elevation is not required on Fortinet devices - Skipped
:param become_context: Unused input.
:return: None
"""
return None
def login(self, username, password):
"""Call a defined login endpoint to receive an authentication token."""
if (username is None or password is None) and self.get_access_token() is None:
raise Exception('Please provide access token or username/password to login')
if self.get_access_token() is None:
self.log('login with username and password')
data = "username=" + urllib.parse.quote(username) + "&secretkey=" + urllib.parse.quote(password) + "&ajax=1"
dummy, result_data = self.send_request(url='/logincheck', data=data, method='POST')
self.log('login with user: %s %s' % (username, 'succeeds' if result_data[0] == '1' else 'fails'))
if result_data[0] != '1':
raise Exception('Wrong credentials. Please check')
# If we succeed to login, we retrieve the system status first
else:
self.log('Calling Fortios with access tokens, no login needed')
url = '/api/v2/cmdb/system/interface?vdom=root&action=schema'
status, response = self.send_request(url=url)
if status == 401:
raise Exception('Invalid access token. Please check')
def logout(self):
""" Call to implement session logout."""
self.log('logout')
if not self.get_access_token():
self.send_request(url='/logout', method="POST")
def update_auth(self, response, response_text):
"""
Get cookies and obtain value for csrftoken that will be used on next requests
:param response: Response given by the server.
:param response_text Unused_input.
:return: Dictionary containing headers
"""
self.log('update_auth')
if self.get_access_token() is None:
headers = {}
for attr, val in response.getheaders():
if attr.lower() == 'set-cookie' and 'APSCOOKIE_' in val:
headers['Cookie'] = val
elif attr.lower() == 'set-cookie' and 'ccsrftoken=' in val:
csrftoken_search = re.search('\"(.*)\"', val)
if csrftoken_search:
self._ccsrftoken = csrftoken_search.group(1)
headers['x-csrftoken'] = self._ccsrftoken
self.log('update x-csrftoken: %s' % (self._ccsrftoken))
return headers
else:
self.log('using access token - setting header')
return {
"Accept": "application/json"
}
def handle_httperror(self, exc):
"""
propogate exceptions to users
:param exc: Exception
"""
self.log('Exception thrown from handling http: ' + to_text(exc))
return exc
def _concat_token(self, url):
if self.get_access_token():
token_pair = 'access_token=' + self.get_access_token()
return url + '&' + token_pair if '?' in url else url + '?' + token_pair
return url
def _concat_params(self, url, params):
if not params or not len(params):
return url
url = url + '?' if '?' not in url else url
for param_key in params:
param_value = params[param_key]
if url[-1] == '?':
url += '%s=%s' % (param_key, param_value)
else:
url += '&%s=%s' % (param_key, param_value)
return url
def send_request(self, **message_kwargs):
"""
Responsible for actual sending of data to the connection httpapi base plugin.
:param message_kwargs: A formatted dictionary containing request info: url, data, method
:return: Status code and response data.
"""
url = message_kwargs.get('url', '/')
if self.get_access_token() is not None:
url = self._concat_token(message_kwargs.get('url', '/'))
data = message_kwargs.get('data', '')
method = message_kwargs.get('method', 'GET')
params = message_kwargs.get('params', {})
headers = dict(message_kwargs.get('headers', {}))
headers.update({'Accept': 'application/json'})
url = self._concat_params(url, params)
self.log('send request: METHOD:[%s] URL:[%s] DATA:[%s], headers:[%s]' % (method, url, data, headers))
try:
response, response_data = self.connection.send(url, data, method=method, headers=headers)
json_formatted = to_text(response_data.getvalue())
self.log("response data: %s..." % (json_formatted[:200]))
return response.status, json_formatted
except Exception as err:
raise Exception(err)
def update_system_version(self):
"""
retrieve the system status of fortigate device
"""
self.log('checking system_version')
check_system_status = self._conn.get_option('check_system_status') if 'check_system_status' in self._conn._options else True
if not check_system_status or self._system_version:
return
url = '/api/v2/cmdb/system/interface?vdom=root&action=schema'
status, result = self.send_request(url=url)
result_json = json.loads(result)
self._system_version = result_json.get('version', 'undefined')
self.log('system version: %s' % (self._system_version))
self.log('ansible version: %s' % (self._ansible_fos_version))
def get_system_version(self):
self.update_system_version()
return self._system_version

View File

@@ -0,0 +1,271 @@
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# BEGIN STATIC DATA / MESSAGES
class FMGRMethods:
GET = "get"
SET = "set"
EXEC = "exec"
EXECUTE = "exec"
UPDATE = "update"
ADD = "add"
DELETE = "delete"
REPLACE = "replace"
CLONE = "clone"
MOVE = "move"
BASE_HEADERS = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
# FMGR RETURN CODES
FMGR_RC = {
"fmgr_return_codes": {
0: {
"msg": "OK",
"changed": True,
"stop_on_success": True
},
-100000: {
"msg": "Module returned without actually running anything. "
"Check parameters, and please contact the authors if needed.",
"failed": True
},
-2: {
"msg": "Object already exists.",
"skipped": True,
"changed": False,
"good_codes": [0, -2]
},
-6: {
"msg": "Invalid Url. Sometimes this can happen because the path is mapped to a hostname or object that"
" doesn't exist. Double check your input object parameters."
},
-3: {
"msg": "Object doesn't exist.",
"skipped": True,
"changed": False,
"good_codes": [0, -3]
},
-10131: {
"msg": "Object dependency failed. Do all named objects in parameters exist?",
"changed": False,
"skipped": True
},
-9998: {
"msg": "Duplicate object. Try using mode='set', if using add. STOPPING. Use 'ignore_errors=yes' in playbook"
"to override and mark successful.",
},
-20042: {
"msg": "Device Unreachable.",
"skipped": True
},
-10033: {
"msg": "Duplicate object. Try using mode='set', if using add.",
"changed": False,
"skipped": True
},
-10000: {
"msg": "Duplicate object. Try using mode='set', if using add.",
"changed": False,
"skipped": True
},
-20010: {
"msg": "Device already added to FortiManager. Serial number already in use.",
"good_codes": [0, -20010],
"changed": False,
"stop_on_success": True
},
-20002: {
"msg": "Invalid Argument -- Does this Device exist on FortiManager?",
"changed": False,
"skipped": True,
}
}
}
DEFAULT_RESULT_OBJ = (-100000, {"msg": "Nothing Happened. Check that handle_response is being called!"})
FAIL_SOCKET_MSG = {"msg": "Socket Path Empty! The persistent connection manager is messed up. "
"Try again in a few moments."}
# BEGIN ERROR EXCEPTIONS
class FMGBaseException(Exception):
"""Wrapper to catch the unexpected"""
def __init__(self, msg=None, *args, **kwargs):
if msg is None:
msg = "An exception occurred within the fortimanager.py httpapi connection plugin."
super(FMGBaseException, self).__init__(msg, *args)
# END ERROR CLASSES
# BEGIN CLASSES
class FMGRCommon(object):
@staticmethod
def format_request(method, url, *args, **kwargs):
"""
Formats the payload from the module, into a payload the API handler can use.
:param url: Connection URL to access
:type url: string
:param method: The preferred API Request method (GET, ADD, POST, etc....)
:type method: basestring
:param kwargs: The payload dictionary from the module to be converted.
:return: Properly formatted dictionary payload for API Request via Connection Plugin.
:rtype: dict
"""
params = [{"url": url}]
if args:
for arg in args:
params[0].update(arg)
if kwargs:
keylist = list(kwargs)
for k in keylist:
kwargs[k.replace("__", "-")] = kwargs.pop(k)
if method == "get" or method == "clone":
params[0].update(kwargs)
else:
if kwargs.get("data", False):
params[0]["data"] = kwargs["data"]
else:
params[0]["data"] = kwargs
return params
@staticmethod
def split_comma_strings_into_lists(obj):
"""
Splits a CSV String into a list. Also takes a dictionary, and converts any CSV strings in any key, to a list.
:param obj: object in CSV format to be parsed.
:type obj: str or dict
:return: A list containing the CSV items.
:rtype: list
"""
return_obj = ()
if isinstance(obj, dict):
if len(obj) > 0:
for k, v in obj.items():
if isinstance(v, str):
new_list = list()
if "," in v:
new_items = v.split(",")
for item in new_items:
new_list.append(item.strip())
obj[k] = new_list
return_obj = obj
elif isinstance(obj, str):
return_obj = obj.replace(" ", "").split(",")
return return_obj
@staticmethod
def cidr_to_netmask(cidr):
"""
Converts a CIDR Network string to full blown IP/Subnet format in decimal format.
Decided not use IP Address module to keep includes to a minimum.
:param cidr: String object in CIDR format to be processed
:type cidr: str
:return: A string object that looks like this "x.x.x.x/y.y.y.y"
:rtype: str
"""
if isinstance(cidr, str):
cidr = int(cidr)
mask = (0xffffffff >> (32 - cidr)) << (32 - cidr)
return (str((0xff000000 & mask) >> 24) + '.'
+ str((0x00ff0000 & mask) >> 16) + '.'
+ str((0x0000ff00 & mask) >> 8) + '.'
+ str((0x000000ff & mask)))
@staticmethod
def paramgram_child_list_override(list_overrides, paramgram, module):
"""
If a list of items was provided to a "parent" paramgram attribute, the paramgram needs to be rewritten.
The child keys of the desired attribute need to be deleted, and then that "parent" keys' contents is replaced
With the list of items that was provided.
:param list_overrides: Contains the response from the FortiManager.
:type list_overrides: list
:param paramgram: Contains the paramgram passed to the modules' local modify function.
:type paramgram: dict
:param module: Contains the Ansible Module Object being used by the module.
:type module: classObject
:return: A new "paramgram" refactored to allow for multiple entries being added.
:rtype: dict
"""
if len(list_overrides) > 0:
for list_variable in list_overrides:
try:
list_variable = list_variable.replace("-", "_")
override_data = module.params[list_variable]
if override_data:
del paramgram[list_variable]
paramgram[list_variable] = override_data
except BaseException as e:
raise FMGBaseException("Error occurred merging custom lists for the paramgram parent: " + str(e))
return paramgram
@staticmethod
def syslog(module, msg):
try:
module.log(msg=msg)
except BaseException:
pass
# RECURSIVE FUNCTIONS START
def prepare_dict(obj):
"""
Removes any keys from a dictionary that are only specific to our use in the module. FortiManager will reject
requests with these empty/None keys in it.
:param obj: Dictionary object to be processed.
:type obj: dict
:return: Processed dictionary.
:rtype: dict
"""
list_of_elems = ["mode", "adom", "host", "username", "password"]
if isinstance(obj, dict):
obj = dict((key, prepare_dict(value)) for (key, value) in obj.items() if key not in list_of_elems)
return obj
def scrub_dict(obj):
"""
Removes any keys from a dictionary that are EMPTY -- this includes parent keys. FortiManager doesn't
like empty keys in dictionaries
:param obj: Dictionary object to be processed.
:type obj: dict
:return: Processed dictionary.
:rtype: dict
"""
if isinstance(obj, dict):
return dict((k, scrub_dict(v)) for k, v in obj.items() if v and scrub_dict(v))
else:
return obj

View File

@@ -0,0 +1,449 @@
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.fortinet.fortios.plugins.module_utils.fortimanager.common import FMGR_RC
from ansible_collections.fortinet.fortios.plugins.module_utils.fortimanager.common import FMGBaseException
from ansible_collections.fortinet.fortios.plugins.module_utils.fortimanager.common import FMGRCommon
from ansible_collections.fortinet.fortios.plugins.module_utils.fortimanager.common import scrub_dict
# check for pyFMG lib - DEPRECATING
try:
from pyFMG.fortimgr import FortiManager
HAS_PYFMGR = True
except ImportError:
HAS_PYFMGR = False
# ACTIVE BUG WITH OUR DEBUG IMPORT CALL -- BECAUSE IT'S UNDER MODULE_UTILITIES
# WHEN module_common.recursive_finder() runs under the module loader, it looks for this namespace debug import
# and because it's not there, it always fails, regardless of it being under a try/catch here.
# we're going to move it to a different namespace.
# # check for debug lib
# try:
# from ansible.module_utils.network.fortimanager.fortimanager_debug import debug_dump
# HAS_FMGR_DEBUG = True
# except:
# HAS_FMGR_DEBUG = False
# BEGIN HANDLER CLASSES
class FortiManagerHandler(object):
def __init__(self, conn, module):
self._conn = conn
self._module = module
self._tools = FMGRCommon
def process_request(self, url, datagram, method):
"""
Formats and Runs the API Request via Connection Plugin. Streamlined for use FROM Modules.
:param url: Connection URL to access
:type url: string
:param datagram: The prepared payload for the API Request in dictionary format
:type datagram: dict
:param method: The preferred API Request method (GET, ADD, POST, etc....)
:type method: basestring
:return: Dictionary containing results of the API Request via Connection Plugin
:rtype: dict
"""
data = self._tools.format_request(method, url, **datagram)
response = self._conn.send_request(method, data)
# if HAS_FMGR_DEBUG:
# try:
# debug_dump(response, datagram, self._module.paramgram, url, method)
# except BaseException:
# pass
return response
def govern_response(self, module, results, msg=None, good_codes=None,
stop_on_fail=None, stop_on_success=None, skipped=None,
changed=None, unreachable=None, failed=None, success=None, changed_if_success=None,
ansible_facts=None):
"""
This function will attempt to apply default values to canned responses from FortiManager we know of.
This saves time, and turns the response in the module into a "one-liner", while still giving us...
the flexibility to directly use return_response in modules if we have too. This function saves repeated code.
:param module: The Ansible Module CLASS object, used to run fail/exit json
:type module: object
:param msg: An overridable custom message from the module that called this.
:type msg: string
:param results: A dictionary object containing an API call results
:type results: dict
:param good_codes: A list of exit codes considered successful from FortiManager
:type good_codes: list
:param stop_on_fail: If true, stops playbook run when return code is NOT IN good codes (default: true)
:type stop_on_fail: boolean
:param stop_on_success: If true, stops playbook run when return code is IN good codes (default: false)
:type stop_on_success: boolean
:param changed: If True, tells Ansible that object was changed (default: false)
:type skipped: boolean
:param skipped: If True, tells Ansible that object was skipped (default: false)
:type skipped: boolean
:param unreachable: If True, tells Ansible that object was unreachable (default: false)
:type unreachable: boolean
:param failed: If True, tells Ansible that execution was a failure. Overrides good_codes. (default: false)
:type unreachable: boolean
:param success: If True, tells Ansible that execution was a success. Overrides good_codes. (default: false)
:type unreachable: boolean
:param changed_if_success: If True, defaults to changed if successful if you specify or not"
:type changed_if_success: boolean
:param ansible_facts: A prepared dictionary of ansible facts from the execution.
:type ansible_facts: dict
"""
if module is None and results is None:
raise FMGBaseException("govern_response() was called without a module and/or results tuple! Fix!")
# Get the Return code from results
try:
rc = results[0]
except BaseException:
raise FMGBaseException("govern_response() was called without the return code at results[0]")
# init a few items
rc_data = None
# Get the default values for the said return code.
try:
rc_codes = FMGR_RC.get('fmgr_return_codes')
rc_data = rc_codes.get(rc)
except BaseException:
pass
if not rc_data:
rc_data = {}
# ONLY add to overrides if not none -- This is very important that the keys aren't added at this stage
# if they are empty. And there aren't that many, so let's just do a few if then statements.
if good_codes is not None:
rc_data["good_codes"] = good_codes
if stop_on_fail is not None:
rc_data["stop_on_fail"] = stop_on_fail
if stop_on_success is not None:
rc_data["stop_on_success"] = stop_on_success
if skipped is not None:
rc_data["skipped"] = skipped
if changed is not None:
rc_data["changed"] = changed
if unreachable is not None:
rc_data["unreachable"] = unreachable
if failed is not None:
rc_data["failed"] = failed
if success is not None:
rc_data["success"] = success
if changed_if_success is not None:
rc_data["changed_if_success"] = changed_if_success
if results is not None:
rc_data["results"] = results
if msg is not None:
rc_data["msg"] = msg
if ansible_facts is None:
rc_data["ansible_facts"] = {}
else:
rc_data["ansible_facts"] = ansible_facts
return self.return_response(module=module,
results=results,
msg=rc_data.get("msg", "NULL"),
good_codes=rc_data.get("good_codes", (0,)),
stop_on_fail=rc_data.get("stop_on_fail", True),
stop_on_success=rc_data.get("stop_on_success", False),
skipped=rc_data.get("skipped", False),
changed=rc_data.get("changed", False),
changed_if_success=rc_data.get("changed_if_success", False),
unreachable=rc_data.get("unreachable", False),
failed=rc_data.get("failed", False),
success=rc_data.get("success", False),
ansible_facts=rc_data.get("ansible_facts", dict()))
@staticmethod
def return_response(module, results, msg="NULL", good_codes=(0,),
stop_on_fail=True, stop_on_success=False, skipped=False,
changed=False, unreachable=False, failed=False, success=False, changed_if_success=True,
ansible_facts=()):
"""
This function controls the logout and error reporting after an method or function runs. The exit_json for
ansible comes from logic within this function. If this function returns just the msg, it means to continue
execution on the playbook. It is called from the ansible module, or from the self.govern_response function.
:param module: The Ansible Module CLASS object, used to run fail/exit json
:type module: object
:param msg: An overridable custom message from the module that called this.
:type msg: string
:param results: A dictionary object containing an API call results
:type results: dict
:param good_codes: A list of exit codes considered successful from FortiManager
:type good_codes: list
:param stop_on_fail: If true, stops playbook run when return code is NOT IN good codes (default: true)
:type stop_on_fail: boolean
:param stop_on_success: If true, stops playbook run when return code is IN good codes (default: false)
:type stop_on_success: boolean
:param changed: If True, tells Ansible that object was changed (default: false)
:type skipped: boolean
:param skipped: If True, tells Ansible that object was skipped (default: false)
:type skipped: boolean
:param unreachable: If True, tells Ansible that object was unreachable (default: false)
:type unreachable: boolean
:param failed: If True, tells Ansible that execution was a failure. Overrides good_codes. (default: false)
:type unreachable: boolean
:param success: If True, tells Ansible that execution was a success. Overrides good_codes. (default: false)
:type unreachable: boolean
:param changed_if_success: If True, defaults to changed if successful if you specify or not"
:type changed_if_success: boolean
:param ansible_facts: A prepared dictionary of ansible facts from the execution.
:type ansible_facts: dict
:return: A string object that contains an error message
:rtype: str
"""
# VALIDATION ERROR
if (len(results) == 0) or (failed and success) or (changed and unreachable):
module.exit_json(msg="Handle_response was called with no results, or conflicting failed/success or "
"changed/unreachable parameters. Fix the exit code on module. "
"Generic Failure", failed=True)
# IDENTIFY SUCCESS/FAIL IF NOT DEFINED
if not failed and not success:
if len(results) > 0:
if results[0] not in good_codes:
failed = True
elif results[0] in good_codes:
success = True
if len(results) > 0:
# IF NO MESSAGE WAS SUPPLIED, GET IT FROM THE RESULTS, IF THAT DOESN'T WORK, THEN WRITE AN ERROR MESSAGE
if msg == "NULL":
try:
msg = results[1]['status']['message']
except BaseException:
msg = "No status message returned at results[1][status][message], " \
"and none supplied to msg parameter for handle_response."
if failed:
# BECAUSE SKIPPED/FAILED WILL OFTEN OCCUR ON CODES THAT DON'T GET INCLUDED, THEY ARE CONSIDERED FAILURES
# HOWEVER, THEY ARE MUTUALLY EXCLUSIVE, SO IF IT IS MARKED SKIPPED OR UNREACHABLE BY THE MODULE LOGIC
# THEN REMOVE THE FAILED FLAG SO IT DOESN'T OVERRIDE THE DESIRED STATUS OF SKIPPED OR UNREACHABLE.
if failed and skipped:
failed = False
if failed and unreachable:
failed = False
if stop_on_fail:
module.exit_json(msg=msg, failed=failed, changed=changed, unreachable=unreachable, skipped=skipped,
results=results[1], ansible_facts=ansible_facts, rc=results[0],
invocation={"module_args": ansible_facts["ansible_params"]})
elif success:
if changed_if_success:
changed = True
success = False
if stop_on_success:
module.exit_json(msg=msg, success=success, changed=changed, unreachable=unreachable,
skipped=skipped, results=results[1], ansible_facts=ansible_facts, rc=results[0],
invocation={"module_args": ansible_facts["ansible_params"]})
return msg
def construct_ansible_facts(self, response, ansible_params, paramgram, *args, **kwargs):
"""
Constructs a dictionary to return to ansible facts, containing various information about the execution.
:param response: Contains the response from the FortiManager.
:type response: dict
:param ansible_params: Contains the parameters Ansible was called with.
:type ansible_params: dict
:param paramgram: Contains the paramgram passed to the modules' local modify function.
:type paramgram: dict
:param args: Free-form arguments that could be added.
:param kwargs: Free-form keyword arguments that could be added.
:return: A dictionary containing lots of information to append to Ansible Facts.
:rtype: dict
"""
facts = {
"response": response,
"ansible_params": scrub_dict(ansible_params),
"paramgram": scrub_dict(paramgram),
"connected_fmgr": self._conn.return_connected_fmgr()
}
if args:
facts["custom_args"] = args
if kwargs:
facts.update(kwargs)
return facts
##########################
# BEGIN DEPRECATED METHODS
##########################
# SOME OF THIS CODE IS DUPLICATED IN THE PLUGIN, BUT THOSE ARE PLUGIN SPECIFIC. THIS VERSION STILL ALLOWS FOR
# THE USAGE OF PYFMG FOR CUSTOMERS WHO HAVE NOT YET UPGRADED TO ANSIBLE 2.7
# LEGACY PYFMG METHODS START
# USED TO DETERMINE LOCK CONTEXT ON A FORTIMANAGER. A DATABASE LOCKING CONCEPT THAT NEEDS TO BE ACCOUNTED FOR.
class FMGLockContext(object):
"""
- DEPRECATING: USING CONNECTION MANAGER NOW INSTEAD. EVENTUALLY THIS CLASS WILL DISAPPEAR. PLEASE
- CONVERT ALL MODULES TO CONNECTION MANAGER METHOD.
- LEGACY pyFMG HANDLER OBJECT: REQUIRES A CHECK FOR PY FMG AT TOP OF PAGE
"""
def __init__(self, fmg):
self._fmg = fmg
self._locked_adom_list = list()
self._uses_workspace = False
self._uses_adoms = False
@property
def uses_workspace(self):
return self._uses_workspace
@uses_workspace.setter
def uses_workspace(self, val):
self._uses_workspace = val
@property
def uses_adoms(self):
return self._uses_adoms
@uses_adoms.setter
def uses_adoms(self, val):
self._uses_adoms = val
def add_adom_to_lock_list(self, adom):
if adom not in self._locked_adom_list:
self._locked_adom_list.append(adom)
def remove_adom_from_lock_list(self, adom):
if adom in self._locked_adom_list:
self._locked_adom_list.remove(adom)
def check_mode(self):
url = "/cli/global/system/global"
code, resp_obj = self._fmg.get(url, fields=["workspace-mode", "adom-status"])
try:
if resp_obj["workspace-mode"] != 0:
self.uses_workspace = True
except KeyError:
self.uses_workspace = False
try:
if resp_obj["adom-status"] == 1:
self.uses_adoms = True
except KeyError:
self.uses_adoms = False
def run_unlock(self):
for adom_locked in self._locked_adom_list:
self.unlock_adom(adom_locked)
def lock_adom(self, adom=None, *args, **kwargs):
if adom:
if adom.lower() == "global":
url = "/dvmdb/global/workspace/lock/"
else:
url = "/dvmdb/adom/{adom}/workspace/lock/".format(adom=adom)
else:
url = "/dvmdb/adom/root/workspace/lock"
code, respobj = self._fmg.execute(url, {}, *args, **kwargs)
if code == 0 and respobj["status"]["message"].lower() == "ok":
self.add_adom_to_lock_list(adom)
return code, respobj
def unlock_adom(self, adom=None, *args, **kwargs):
if adom:
if adom.lower() == "global":
url = "/dvmdb/global/workspace/unlock/"
else:
url = "/dvmdb/adom/{adom}/workspace/unlock/".format(adom=adom)
else:
url = "/dvmdb/adom/root/workspace/unlock"
code, respobj = self._fmg.execute(url, {}, *args, **kwargs)
if code == 0 and respobj["status"]["message"].lower() == "ok":
self.remove_adom_from_lock_list(adom)
return code, respobj
def commit_changes(self, adom=None, aux=False, *args, **kwargs):
if adom:
if aux:
url = "/pm/config/adom/{adom}/workspace/commit".format(adom=adom)
else:
if adom.lower() == "global":
url = "/dvmdb/global/workspace/commit/"
else:
url = "/dvmdb/adom/{adom}/workspace/commit".format(adom=adom)
else:
url = "/dvmdb/adom/root/workspace/commit"
return self._fmg.execute(url, {}, *args, **kwargs)
# DEPRECATED -- USE PLUGIN INSTEAD
class AnsibleFortiManager(object):
"""
- DEPRECATING: USING CONNECTION MANAGER NOW INSTEAD. EVENTUALLY THIS CLASS WILL DISAPPEAR. PLEASE
- CONVERT ALL MODULES TO CONNECTION MANAGER METHOD.
- LEGACY pyFMG HANDLER OBJECT: REQUIRES A CHECK FOR PY FMG AT TOP OF PAGE
"""
def __init__(self, module, ip=None, username=None, passwd=None, use_ssl=True, verify_ssl=False, timeout=300):
self.ip = ip
self.username = username
self.passwd = passwd
self.use_ssl = use_ssl
self.verify_ssl = verify_ssl
self.timeout = timeout
self.fmgr_instance = None
if not HAS_PYFMGR:
module.fail_json(msg='Could not import the python library pyFMG required by this module')
self.module = module
def login(self):
if self.ip is not None:
self.fmgr_instance = FortiManager(self.ip, self.username, self.passwd, use_ssl=self.use_ssl,
verify_ssl=self.verify_ssl, timeout=self.timeout, debug=False,
disable_request_warnings=True)
return self.fmgr_instance.login()
def logout(self):
if self.fmgr_instance.sid is not None:
self.fmgr_instance.logout()
def get(self, url, data):
return self.fmgr_instance.get(url, **data)
def set(self, url, data):
return self.fmgr_instance.set(url, **data)
def update(self, url, data):
return self.fmgr_instance.update(url, **data)
def delete(self, url, data):
return self.fmgr_instance.delete(url, **data)
def add(self, url, data):
return self.fmgr_instance.add(url, **data)
def execute(self, url, data):
return self.fmgr_instance.execute(url, **data)
def move(self, url, data):
return self.fmgr_instance.move(url, **data)
def clone(self, url, data):
return self.fmgr_instance.clone(url, **data)
##########################
# END DEPRECATED METHODS
##########################

View File

@@ -0,0 +1,38 @@
from __future__ import (absolute_import, division, print_function)
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
__metaclass__ = type
"""
The arg spec for the fortios monitor module.
"""
class FactsArgs(object):
""" The arg spec for the fortios monitor module
"""
def __init__(self, **kwargs):
pass
argument_spec = {
"host": {"required": False, "type": "str"},
"username": {"required": False, "type": "str"},
"password": {"required": False, "type": "str", "no_log": True},
"vdom": {"required": False, "type": "str", "default": "root"},
"https": {"required": False, "type": "bool", "default": True},
"ssl_verify": {"required": False, "type": "bool", "default": False},
"gather_subset": {
"required": True, "type": "list", "elements": "dict",
"options": {
"fact": {"required": True, "type": "str"},
"filters": {"required": False, "type": "list", "elements": "dict"}
}
}
}

View File

@@ -0,0 +1,32 @@
#
# -*- coding: utf-8 -*-
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
"""
The arg spec for the fortios_facts module
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class SystemArgs(object):
"""The arg spec for the fortios_facts module
"""
FACT_SYSTEM_SUBSETS = frozenset([
'system_current-admins_select',
'system_firmware_select',
'system_fortimanager_status',
'system_ha-checksums_select',
'system_interface_select',
'system_status_select',
'system_time_select',
])
def __init__(self, **kwargs):
pass

View File

@@ -0,0 +1,135 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re
IP_PREFIX = re.compile("^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}")
def bits(netmask):
count = 0
while (netmask):
count += netmask & 1
netmask >>= 1
return count
def is_same_ip_address(current_ip, applied_ip):
'''
current_ip can be either an ip of type str or ip and subnet of tye list
ip like "10.10.10.0"
ip with subnet mask: ["10.10.10.0", "255.255.255.0"]
applied_ip can be in 3 formats:
2 same as above and
"10.10.10.0/24"
'''
if type(current_ip) is list:
current_ip = ' '.join(current_ip)
if len(current_ip) == 0 and len(applied_ip) == 0:
return True
if len(current_ip) == 0 or len(applied_ip) == 0:
return False
if ' ' not in applied_ip and '/' not in applied_ip:
return current_ip == applied_ip
splitted_current_ip = [current_ip]
splitted_applied_ip = [applied_ip]
total_bits_current_ip = 0
total_bits_applied_ip = 0
if ' ' in current_ip:
splitted_current_ip = current_ip.split(' ')
elif '/' in current_ip:
splitted_current_ip = current_ip.split('/')
if ' ' in applied_ip:
splitted_applied_ip = applied_ip.split(' ')
elif '/' in applied_ip:
splitted_applied_ip = applied_ip.split('/')
if splitted_current_ip[0] != splitted_applied_ip[0]:
return False
else:
if '.' in splitted_current_ip[1]:
total_bits_current_ip = sum([bits(int(s)) for s in splitted_current_ip[1].split('.')])
else:
total_bits_current_ip = int(splitted_current_ip[1])
if '.' in splitted_applied_ip[1]:
total_bits_applied_ip = sum([bits(int(s)) for s in splitted_applied_ip[1].split('.')])
else:
total_bits_applied_ip = int(splitted_applied_ip[1])
return total_bits_current_ip == total_bits_applied_ip
def is_same_comparison(reorder_current, reorder_filtered):
for key, value in reorder_filtered.items():
if key not in reorder_current:
return False
if type(value) == dict:
if not is_same_comparison(reorder_current[key], value):
return False
elif type(value) == list:
if len(value) != len(reorder_current[key]):
return False
if len(value) and type(value[0]) == dict:
for current_dict in reorder_current[key]:
if not is_same_comparison(current_dict, value[0]):
return False
elif reorder_current[key] != value:
return False
elif type(value) == str and IP_PREFIX.match(value):
return is_same_ip_address(reorder_current[key], value)
elif reorder_current[key] != value:
return False
return True
def serialize(data):
if type(data) == str and ' ' in data:
return serialize(data.split(' '))
if type(data) == list and len(data) > 0:
if type(data[0]) == dict:
list_to_order = []
for dt in data:
ret = {}
for key, value in dt.items():
ret[key] = serialize(value)
list_to_order.append(ret)
return sorted(list_to_order, key=lambda dt: str(dt.items()))
else:
return sorted(data)
if type(data) == dict:
result = {}
for key, value in data.items():
result[key] = serialize(value)
return result
return data
def validate_result(result, desc):
if not result:
raise AssertionError("failed on test " + desc)
if __name__ == '__main__':
validate_result(is_same_ip_address("10.29.0.0", "10.29.0.0"), "ip only")
validate_result(is_same_ip_address("10.29.0.0/24", "10.29.0.0/24"), 'slash and slash')
validate_result(is_same_ip_address("11.11.10.0 255.255.254.0", "11.11.10.0/23"), 'slash and space')
validate_result(is_same_ip_address("10.29.0.0/24", "10.29.0.0 255.255.255.0"), 'slash and space')
validate_result(is_same_ip_address("10.29.0.0/24", "10.29.0.0 255.255.255.0"), 'slash and space')
validate_result(is_same_ip_address("10.29.0.0", "10.29.0.0"), 'ip only')
validate_result(is_same_ip_address("10.29.0.0 255.255.255.0", "10.29.0.0 255.255.255.0"), 'space and space')
validate_result(is_same_ip_address("10.29.0.0 255.255.255.0", "10.29.0.0 255.255.255.0"), 'space and space')
validate_result(is_same_ip_address("10.29.0.0 255.255.255.0", "10.29.0.0 255.255.255.0"), 'space and space')
validate_result(is_same_ip_address(["10.29.0.0", "255.255.255.0"], "10.29.0.0 255.255.255.0"), 'space and space')
validate_result(is_same_ip_address(["10.29.0.0", "255.255.255.0"], "10.29.0.0/24"), 'space and space')

View File

@@ -0,0 +1,23 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
def remove_invalid_fields(input_data):
# print('data type', type(input_data), isinstance(input_data, list))
if not isinstance(input_data, dict) and not isinstance(input_data, list):
# print('base case')
return input_data
if isinstance(input_data, dict):
# print("proc dict")
result = {}
for key, value in input_data.items():
if value is None:
continue
result[key] = remove_invalid_fields(value)
return result
if isinstance(input_data, list):
# print('proc list')
result = []
for item in input_data:
result.append(remove_invalid_fields(item))
return result

View File

@@ -0,0 +1,85 @@
from __future__ import (absolute_import, division, print_function)
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
__metaclass__ = type
"""
The facts class for fortios
this file validates each subset of monitor and selectively
calls the appropriate facts gathering and monitoring function
"""
# from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.argspec.facts.facts import FactsArgs
from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.argspec.system.system import SystemArgs
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts import FactsBase
from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.facts.system.system import SystemFacts
class Facts(FactsBase):
""" The facts class for fortios
"""
FACT_SUBSETS = {
"system": SystemFacts
}
def __init__(self, module, fos=None, subset=None):
super(Facts, self).__init__(module)
self._fos = fos
self._subset = subset
def gen_runable(self, subsets, valid_subsets):
""" Generate the runable subset
:param module: The module instance
:param subsets: The provided subsets
:param valid_subsets: The valid subsets
:rtype: list
:returns: The runable subsets
"""
runable_subsets = []
FACT_DETAIL_SUBSETS = []
FACT_DETAIL_SUBSETS.extend(SystemArgs.FACT_SYSTEM_SUBSETS)
for subset in subsets:
if subset['fact'] not in FACT_DETAIL_SUBSETS:
self._module.fail_json(msg='Subset must be one of [%s], got %s' %
(', '.join(sorted(FACT_DETAIL_SUBSETS)), subset['fact']))
for valid_subset in frozenset(self.FACT_SUBSETS.keys()):
if subset['fact'].startswith(valid_subset):
runable_subsets.append((subset, valid_subset))
return runable_subsets
def get_network_legacy_facts(self, fact_legacy_obj_map, legacy_facts_type=None):
if not legacy_facts_type:
legacy_facts_type = self._gather_subset
runable_subsets = self.gen_runable(legacy_facts_type, frozenset(fact_legacy_obj_map.keys()))
if runable_subsets:
self.ansible_facts['ansible_net_gather_subset'] = []
instances = list()
for (subset, valid_subset) in runable_subsets:
instances.append(fact_legacy_obj_map[valid_subset](self._module, self._fos, subset))
for inst in instances:
inst.populate_facts(self._connection, self.ansible_facts)
def get_facts(self, facts_type=None, data=None):
""" Collect the facts for fortios
:param facts_type: List of facts types
:param data: previously collected conf
:rtype: dict
:return: the facts gathered
"""
self.get_network_legacy_facts(self.FACT_SUBSETS, facts_type)
return self.ansible_facts, self._warnings

View File

@@ -0,0 +1,61 @@
#
# -*- coding: utf-8 -*-
# Copyright 2019 Fortinet, Inc.
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The fortios system facts class
It is in this file the runtime information is collected from the device
for a given resource, parsed, and the facts tree is populated
based on the configuration.
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.argspec.system.system import SystemArgs
class SystemFacts(object):
""" The fortios system facts class
"""
def __init__(self, module, fos=None, subset=None, subspec='config', options='options'):
self._module = module
self._fos = fos
self._subset = subset
def populate_facts(self, connection, ansible_facts, data=None):
""" Populate the facts for system
:param connection: the device connection
:param ansible_facts: Facts dictionary
:rtype: dictionary
:returns: facts
"""
ansible_facts['ansible_network_resources'].pop('system', None)
facts = {}
if self._subset['fact'].startswith(tuple(SystemArgs.FACT_SYSTEM_SUBSETS)):
gather_method = getattr(self, self._subset['fact'].replace('-', '_'), self.system_fact)
resp = gather_method()
facts.update({self._subset['fact']: resp})
ansible_facts['ansible_network_resources'].update(facts)
return ansible_facts
def system_fact(self):
fos = self._fos
vdom = self._module.params['vdom']
return fos.monitor('system', self._subset['fact'][len('system_'):].replace('_', '/'), vdom=vdom)
def system_interface_select(self):
fos = self._fos
vdom = self._module.params['vdom']
query_string = '?vdom=' + vdom
system_interface_select_param = self._subset['filters']
if system_interface_select_param:
for filter in system_interface_select_param:
for key, val in filter.items():
if val:
query_string += '&' + str(key) + '=' + str(val)
return fos.monitor('system', self._subset['fact'][len('system_'):].replace('_', '/') + query_string, vdom=None)

View File

@@ -0,0 +1,770 @@
# Copyright (c) 2022 Fortinet
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import time
import traceback
from ansible.module_utils._text import to_text
import json
try:
import urllib.parse as urlencoding
except ImportError:
import urllib as urlencoding
# BEGIN DEPRECATED
# check for pyFG lib
try:
from pyFG import FortiOS, FortiConfig
from pyFG.exceptions import FailedCommit
HAS_PYFG = True
except ImportError:
HAS_PYFG = False
fortios_required_if = [
['file_mode', False, ['host', 'username', 'password']],
['file_mode', True, ['config_file']],
['backup', True, ['backup_path']],
]
fortios_mutually_exclusive = [
['config_file', 'host'],
['config_file', 'username'],
['config_file', 'password']
]
fortios_error_codes = {
'-3': "Object not found",
'-61': "Command error"
}
def check_legacy_fortiosapi(module):
legacy_schemas = ['host', 'username', 'password', 'ssl_verify', 'https']
legacy_params = []
for param in legacy_schemas:
if param in module.params:
legacy_params.append(param)
if len(legacy_params):
error_message = 'Legacy fortiosapi parameters %s detected, please use HTTPAPI instead!' % (str(legacy_params))
module.fail_json(msg=error_message)
def schema_to_module_spec(schema):
rdata = dict()
if 'type' not in schema:
raise AssertionError('Invalid Schema')
if schema['type'] == 'dict' or (schema['type'] == 'list' and 'children' in schema):
if 'children' not in schema:
raise AssertionError()
rdata['type'] = schema['type']
if schema['type'] == 'list':
rdata['elements'] = schema.get('elements')
rdata['required'] = False
rdata['options'] = dict()
for child in schema['children']:
child_value = schema['children'][child]
rdata['options'][child] = schema_to_module_spec(child_value)
if (child):
rdata['options'][child]['no_log'] = True
elif schema['type'] in ['integer', 'string'] or (schema['type'] == 'list' and 'children' not in schema):
if schema['type'] == 'integer':
rdata['type'] = 'int'
elif schema['type'] == 'string':
rdata['type'] = 'str'
elif schema['type'] == 'list':
rdata['type'] = 'list'
rdata['elements'] = schema.get('elements')
else:
raise AssertionError()
rdata['required'] = False
if 'options' in schema:
# see mantis #0690570, if the semantic meaning changes, remove choices as well
# also see accept_auth_by_cert of module fortios_system_csf.
# ansible-test now requires choices are present in spec
rdata['choices'] = [option['value'] for option in schema['options']]
else:
raise AssertionError()
return rdata
def __check_version(revisions, version):
result = dict()
resolved_versions = list(revisions.keys())
resolved_versions.sort(key=lambda x: int(x.split('.')[0][1]) * 10000 + int(x.split('.')[1]) * 100 + int(x.split('.')[2]))
# try to detect the versioning gaps and mark them as violations:
nearest_index = -1
for i in range(len(resolved_versions)):
if resolved_versions[i] <= version:
nearest_index = i
if nearest_index == -1:
# even it's not supported in earliest version
result['supported'] = False
result['reason'] = 'not supported until in %s' % (resolved_versions[0])
else:
if revisions[resolved_versions[nearest_index]] is False:
latest_index = -1
for i in range(nearest_index + 1, len(resolved_versions)):
if revisions[resolved_versions[i]] is True:
latest_index = i
break
earliest_index = nearest_index
while earliest_index >= 0:
if revisions[resolved_versions[earliest_index]] is True:
break
earliest_index -= 1
earliest_index = 0 if earliest_index < 0 else earliest_index
if latest_index == -1:
result['reason'] = 'not supported since %s' % (resolved_versions[earliest_index])
else:
result['reason'] = 'not supported since %s, before %s' % (resolved_versions[earliest_index], resolved_versions[latest_index])
result['supported'] = False
else:
result['supported'] = True
return result
def __concat_attribute_sequence(trace_path):
rdata = ''
if type(trace_path) is not list:
raise AssertionError()
if len(trace_path) >= 1:
rdata += str(trace_path[0])
for item in trace_path[1:]:
rdata += '.' + str(item)
return rdata
def check_schema_versioning_internal(results, trace, schema, params, version):
if not schema or not params:
return
if 'revisions' not in schema:
raise AssertionError()
revision = schema['revisions']
matched = __check_version(revision, version)
if matched['supported'] is False:
results['mismatches'].append('option %s %s' % (__concat_attribute_sequence(trace), matched['reason']))
if 'type' not in schema:
return
if schema['type'] == 'list':
if type(params) is not list:
raise AssertionError()
if 'children' in schema:
if 'options' in schema:
raise AssertionError()
for list_item in params:
if type(list_item) is not dict:
# Parameter inconsistency here is not covered by Ansible, we gracefully throw a warning
results['mismatches'].append('option [%s]\' playload is inconsistent with schema.' % (__concat_attribute_sequence(trace)))
continue
for key in list_item:
value = list_item[key]
key_string = '%s(%s)' % (key, value) if type(value) in [int, bool, str] else key
trace.append(key_string)
check_schema_versioning_internal(results, trace, schema['children'][key], value, version)
del trace[-1]
elif 'options' in schema:
for param in params:
if type(param) not in [int, bool, str]:
raise AssertionError()
target_option = None
for option in schema['options']:
if option['value'] == param:
target_option = option
break
if not target_option:
raise AssertionError()
trace.append('[%s]' % param)
check_schema_versioning_internal(results, trace, target_option, param, version)
del trace[-1]
elif schema['type'] == 'dict':
if type(params) is not dict:
raise AssertionError()
if 'children' in schema:
for dict_item_key in params:
dict_item_value = params[dict_item_key]
if dict_item_key not in schema['children']:
raise AssertionError()
key_string = '%s(%s)' % (dict_item_key, dict_item_value) if type(dict_item_value) in [int, bool, str] else dict_item_key
trace.append(key_string)
check_schema_versioning_internal(results, trace, schema['children'][dict_item_key], dict_item_value, version)
del trace[-1]
else:
if type(params) not in [int, str, bool]:
raise AssertionError()
def check_schema_versioning(fos, versioned_schema, top_level_param):
trace = list()
results = dict()
results['matched'] = True
results['mismatches'] = list()
system_version = fos._conn.get_system_version()
params = fos._module.params[top_level_param]
results['system_version'] = system_version
if not params:
# in case no top level parameters are given.
# see module: fortios_firewall_policy
return results
module_revisions = versioned_schema['revisions']
module_matched = __check_version(module_revisions, system_version)
if module_matched['supported'] is False:
results['matched'] = False
results['mismatches'].append('module fortios_%s %s' % (top_level_param, module_matched['reason']))
return results
for param_name in params:
param_value = params[param_name]
if not param_value or param_name not in versioned_schema['children']:
continue
key_string = '%s(%s)' % (param_name, param_value) if type(param_value) in [int, bool, str] else param_name
trace.append(key_string)
check_schema_versioning_internal(results, trace, versioned_schema['children'][param_name], param_value, system_version)
del trace[-1]
if len(results['mismatches']):
results['matched'] = False
return results
# END DEPRECATED
class FortiOSHandler(object):
def __init__(self, conn, mod, module_mkeyname=None):
self._conn = conn
self._module = mod
self._mkeyname = module_mkeyname
def _trace_to_string(self, trace):
trace_string = ''
for _trace in trace:
trace_string += '%s%s' % (_trace, '.' if _trace != trace[-1] else '')
return trace_string
def _validate_member_parameter(self, trace, trace_param, trace_url_tokens, attr_blobs, attr_params):
attr_blob = attr_blobs[0]
current_attr_name = attr_blob['name']
current_attr_mkey = attr_blob['mkey']
trace.append(current_attr_name)
if not attr_params:
self._module.fail_json('parameter %s is empty' % (self._trace_to_string(trace)))
if type(attr_params) not in [list, dict]:
raise AssertionError('Invalid attribute type')
if type(attr_params) is dict:
trace_param_item = dict()
trace_param_item[current_attr_name] = (None, attr_params)
trace_param.append(trace_param_item)
if len(attr_blobs) <= 1:
raise AssertionError('Invalid attribute blob')
next_attr_blob = attr_blobs[1]
next_attr_name = next_attr_blob['name']
self._validate_member_parameter(trace, trace_param, trace_url_tokens, attr_blobs[1:], attr_params[next_attr_name])
del trace_param[-1]
return
for param in attr_params:
if current_attr_mkey not in param or not param[current_attr_mkey]:
self._module.fail_json('parameter %s.%s is empty' % (self._trace_to_string(trace), current_attr_mkey))
trace_param_item = dict()
trace_param_item[current_attr_name] = (param[current_attr_mkey], param)
trace_param.append(trace_param_item)
if len(attr_blobs) > 1:
next_attr_blob = attr_blobs[1]
next_attr_name = next_attr_blob['name']
if next_attr_name in param:
self._validate_member_parameter(trace, trace_param, trace_url_tokens, attr_blobs[1:], param[next_attr_name])
else:
# attribute terminated
url_tokens = list()
for token in trace_param:
url_tokens.append(token)
trace_url_tokens.append(url_tokens)
else:
# terminated normally as last level parameter.
url_tokens = list()
for token in trace_param:
url_tokens.append(token)
trace_url_tokens.append(url_tokens)
del trace_param[-1]
def _process_sub_object(self, all_urls, toplevel_url_token, traced_url_tokens, path, name):
vdom = self._module.params['vdom'] if 'vdom' in self._module.params and self._module.params['vdom'] else None
url_prefix = self.cmdb_url(path, name)
url_suffix = ''
if vdom == 'global':
url_suffix = '?global=1'
elif vdom:
url_suffix = '?vdom=' + vdom
for url_tokens in traced_url_tokens:
url = dict()
url_get = toplevel_url_token
url_put = toplevel_url_token
url_post = toplevel_url_token
url_put_payload = dict()
url_post_payload = dict()
for token in url_tokens:
token_name = str(list(token.keys())[0])
token_value = str(token[token_name][0])
token_payload = token[token_name][1]
token_islast = token == url_tokens[-1]
if token[token_name][0]:
url_get += '/%s/%s' % (token_name.replace('_', '-'), urlencoding.quote(token_value, safe=''))
url_put += '/%s/%s' % (token_name.replace('_', '-'), urlencoding.quote(token_value, safe=''))
else:
url_get += '/%s' % (token_name.replace('_', '-'))
url_put += '/%s' % (token_name.replace('_', '-'))
if not token_islast:
if token[token_name][0]:
url_post += '/%s/%s' % (token_name.replace('_', '-'), urlencoding.quote(token_value, safe=''))
else:
url_post += '/%s' % (token_name.replace('_', '-'))
else:
url_post += '/%s' % (token_name.replace('_', '-'))
url_post_payload = token_payload
url_put_payload = token_payload
url['get'] = url_prefix + url_get + url_suffix
url['put'] = url_prefix + url_put + url_suffix
url['post'] = url_prefix + url_post + url_suffix
url['put_payload'] = url_put_payload
url['post_payload'] = url_post_payload
# DELETE share same url with GET
url['delete'] = url['get']
url['vdom'] = vdom
all_urls.append(url)
def _request_sub_object(self, sub_obj):
directive_state = self._module.params['member_state']
if directive_state not in ['present', 'absent']:
raise AssertionError('Not invalid member_state directive.')
status = None
result_data = None
if directive_state == 'present':
status, result_data = self._conn.send_request(url=sub_obj['get'], params=None, method='GET')
if status == 200:
status, result_data = self._conn.send_request(url=sub_obj['put'], data=json.dumps(sub_obj['put_payload']), method='PUT')
if status == 405:
status, result_data = self._conn.send_request(url=sub_obj['post'], data=json.dumps(sub_obj['post_payload']), method='POST')
else:
status, result_data = self._conn.send_request(url=sub_obj['post'], data=json.dumps(sub_obj['post_payload']), method='POST')
else:
status, result_data = self._conn.send_request(url=sub_obj['delete'], params=None, method='DELETE')
result_data = self.formatresponse(result_data, status, vdom=sub_obj['vdom'])
return result_data
def _process_sub_object_result(self, results):
meta = list()
failed = False
changed = False
for result in results:
sub_obj = result[0]
result_data = result[1]
url = sub_obj['get']
suffix_index = url.find('?')
if suffix_index >= 0:
url = url[:suffix_index]
result_data['object_path'] = url[12:]
meta.append(result_data)
if 'status' in result_data:
if result_data['status'] == 'error':
failed = True
elif result_data['status'] == 'success':
if 'revision_changed' in result_data and result_data['revision_changed'] is True:
changed = True
elif 'revision_changed' not in result_data:
changed = True
self._module.exit_json(meta=meta, changed=changed, failed=failed)
def do_member_operation(self, path, name):
toplevel_name = (path + '_' + name).replace('-', '_').replace('.', '_').replace('+', 'plus')
data = self._module.params
if not data['member_state']:
return
if not data['member_path']:
self._module.fail_json('member_path is empty while member_state is %s' % (data['member_state']))
attribute_path = list()
for attr in data['member_path'].split('/'):
if attr == '':
continue
attribute_path.append(attr.strip(' '))
if not len(attribute_path):
raise AssertionError('member_path should have at least one attribute')
state_present = 'state' in data
if state_present and not self._mkeyname:
raise AssertionError('Invalid mkey scheme!')
if state_present and (not data[toplevel_name] or not data[toplevel_name][self._mkeyname]):
raise AssertionError('parameter %s or %s.%s empty!' % (toplevel_name, toplevel_name, self._mkeyname))
toplevel_url_token = ''
if state_present:
toplevel_url_token = '/%s' % (data[toplevel_name][self._mkeyname])
arg_spec = self._module.argument_spec[toplevel_name]['options']
attr_spec = arg_spec
attr_params = data[toplevel_name]
if not attr_params:
raise AssertionError('Parameter %s is empty' % (toplevel_name))
# collect attribute metadata.
attr_blobs = list()
for attr_pair in attribute_path:
attr_pair_split = attr_pair.split(':')
attr = attr_pair_split[0]
if attr not in attr_spec:
self._module.fail_json('Attribute %s not as part of module schema' % (attr))
attr_spec = attr_spec[attr]
attr_type = attr_spec['type']
if len(attr_pair_split) != 2 and attr_type != 'dict':
self._module.fail_json('wrong attribute format: %s' % (attr_pair))
attr_mkey = attr_pair_split[1] if attr_type == 'list' else None
if 'options' not in attr_spec:
raise AssertionError('Attribute %s not member operable, no children options' % (attr))
attr == attribute_path[-1]
attr_blob = dict()
attr_blob['name'] = attr
attr_blob['mkey'] = attr_mkey
attr_blob['schema'] = attr_spec['options']
attr_spec = attr_spec['options']
attr_blobs.append(attr_blob)
# validate parameters on attributes path.
trace = list()
trace_param = list()
trace_url_tokens = list()
urls = list()
results = list()
trace.append(toplevel_name)
self._validate_member_parameter(trace, trace_param, trace_url_tokens, attr_blobs, attr_params[attr_blobs[0]['name']])
self._process_sub_object(urls, toplevel_url_token, trace_url_tokens, path, name)
for sub_obj in urls:
result = self._request_sub_object(sub_obj)
results.append((sub_obj, result))
self._process_sub_object_result(results)
def cmdb_url(self, path, name, vdom=None, mkey=None):
url = '/api/v2/cmdb/' + path + '/' + name
if mkey:
url = url + '/' + urlencoding.quote(str(mkey), safe='')
if vdom:
if vdom == "global":
url += '?global=1'
else:
url += '?vdom=' + vdom
return url
def mon_url(self, path, name, vdom=None, mkey=None):
url = '/api/v2/monitor/' + path + '/' + name
if mkey:
url = url + '/' + urlencoding.quote(str(mkey), safe='')
if vdom:
if vdom == "global":
url += '?global=1'
else:
url += '?vdom=' + vdom
return url
def log_url(self, path, name, mkey=None):
url = '/api/v2/log/' + path + '/' + name
if mkey:
url = url + '/' + urlencoding.quote(str(mkey), safe='')
return url
def schema(self, path, name, vdom=None):
if vdom is None:
url = self.cmdb_url(path, name) + "?action=schema"
else:
url = self.cmdb_url(path, name, vdom=vdom) + "&action=schema"
status, result_data = self._conn.send_request(url=url)
if status == 200:
if vdom == "global":
return json.loads(to_text(result_data))[0]['results']
else:
return json.loads(to_text(result_data))['results']
else:
return json.loads(to_text(result_data))
def get_mkeyname(self, path, name, vdom=None):
return self._mkeyname
def get_mkey(self, path, name, data, vdom=None):
keyname = self.get_mkeyname(path, name, vdom)
if not keyname:
return None
else:
try:
mkey = data[keyname]
except KeyError:
return None
return mkey
def log_get(self, url, parameters=None):
slash_index = url.find('/')
full_url = self.log_url(url[: slash_index], url[slash_index + 1:])
http_status, result_data = self._conn.send_request(url=full_url, params=parameters, method='GET')
return self.formatresponse(result_data, http_status)
def monitor_get(self, url, vdom=None, parameters=None):
slash_index = url.find('/')
full_url = self.mon_url(url[: slash_index], url[slash_index + 1:], vdom)
http_status, result_data = self._conn.send_request(url=full_url, params=parameters, method='GET')
return self.formatresponse(result_data, http_status, vdom=vdom)
def monitor_post(self, url, data=None, vdom=None, mkey=None, parameters=None):
slash_index = url.find('/')
url = self.mon_url(url[: slash_index], url[slash_index + 1:], vdom)
http_status, result_data = self._conn.send_request(url=url, params=parameters, data=json.dumps(data), method='POST')
return self.formatresponse(result_data, http_status, vdom=vdom)
def get(self, path, name, vdom=None, mkey=None, parameters=None):
url = self.cmdb_url(path, name, vdom, mkey=mkey)
http_status, result_data = self._conn.send_request(url=url, params=parameters, method='GET')
return self.formatresponse(result_data, http_status, vdom=vdom)
def monitor(self, path, name, vdom=None, mkey=None, parameters=None):
url = self.mon_url(path, name, vdom, mkey)
http_status, result_data = self._conn.send_request(url=url, params=parameters, method='GET')
return self.formatresponse(result_data, http_status, vdom=vdom)
def set(self, path, name, data, mkey=None, vdom=None, parameters=None):
if not mkey:
mkey = self.get_mkey(path, name, data, vdom=vdom)
url = self.cmdb_url(path, name, vdom, mkey)
http_status, result_data = self._conn.send_request(url=url, params=parameters, data=json.dumps(data), method='PUT')
if parameters and 'action' in parameters and parameters['action'] == 'move':
return self.formatresponse(result_data, http_status, vdom=vdom)
if http_status == 404 or http_status == 405 or http_status == 500:
return self.post(path, name, data, vdom, mkey)
else:
return self.formatresponse(result_data, http_status, vdom=vdom)
def post(self, path, name, data, vdom=None,
mkey=None, parameters=None):
if mkey:
mkeyname = self.get_mkeyname(path, name, vdom)
data[mkeyname] = mkey
url = self.cmdb_url(path, name, vdom, mkey=None)
http_status, result_data = self._conn.send_request(url=url, params=parameters, data=json.dumps(data), method='POST')
return self.formatresponse(result_data, http_status, vdom=vdom)
def execute(self, path, name, data, vdom=None,
mkey=None, parameters=None, timeout=300):
url = self.mon_url(path, name, vdom, mkey=mkey)
http_status, result_data = self._conn.send_request(url=url, params=parameters, data=json.dumps(data), method='POST', timeout=timeout)
return self.formatresponse(result_data, http_status, vdom=vdom)
def delete(self, path, name, vdom=None, mkey=None, parameters=None, data=None):
if not mkey:
mkey = self.get_mkey(path, name, data, vdom=vdom)
url = self.cmdb_url(path, name, vdom, mkey)
http_status, result_data = self._conn.send_request(url=url, params=parameters, data=json.dumps(data), method='DELETE')
return self.formatresponse(result_data, http_status, vdom=vdom)
def __to_local(self, data, http_status, is_array=False):
try:
resp = json.loads(data)
except Exception:
resp = {'raw': data}
if is_array and type(resp) is not list:
resp = [resp]
if is_array and 'http_status' not in resp[0]:
resp[0]['http_status'] = http_status
elif not is_array and 'status' not in resp:
resp['http_status'] = http_status
return resp
def formatresponse(self, res, http_status=500, vdom=None):
if vdom == "global":
resp = self.__to_local(to_text(res), http_status, True)[0]
resp['vdom'] = "global"
else:
resp = self.__to_local(to_text(res), http_status, False)
return resp
def jsonraw(self, method, path, data, specific_params, vdom=None, parameters=None):
url = path
bvdom = False
if vdom:
if vdom == "global":
url += '?global=1'
else:
url += '?vdom=' + vdom
bvdom = True
if specific_params:
if bvdom:
url += '&'
else:
url += "?"
url += specific_params
http_status, result_data = self._conn.send_request(url=url, method=method, data=json.dumps(data), params=parameters)
return self.formatresponse(result_data, http_status, vdom=vdom)
# BEGIN DEPRECATED
def backup(module, running_config):
backup_path = module.params['backup_path']
backup_filename = module.params['backup_filename']
if not os.path.exists(backup_path):
try:
os.mkdir(backup_path)
except Exception:
module.fail_json(msg="Can't create directory {0} Permission denied ?".format(backup_path))
tstamp = time.strftime("%Y-%m-%d@%H:%M:%S", time.localtime(time.time()))
if 0 < len(backup_filename):
filename = '%s/%s' % (backup_path, backup_filename)
else:
filename = '%s/%s_config.%s' % (backup_path, module.params['host'], tstamp)
try:
open(filename, 'w').write(running_config)
except Exception:
module.fail_json(msg="Can't create backup file {0} Permission denied ?".format(filename))
class AnsibleFortios(object):
def __init__(self, module):
if not HAS_PYFG:
module.fail_json(msg='Could not import the python library pyFG required by this module')
self.result = {
'changed': False,
}
self.module = module
def _connect(self):
if self.module.params['file_mode']:
self.forti_device = FortiOS('')
else:
host = self.module.params['host']
username = self.module.params['username']
password = self.module.params['password']
timeout = self.module.params['timeout']
vdom = self.module.params['vdom']
self.forti_device = FortiOS(host, username=username, password=password, timeout=timeout, vdom=vdom)
try:
self.forti_device.open()
except Exception as e:
self.module.fail_json(msg='Error connecting device. %s' % to_text(e),
exception=traceback.format_exc())
def load_config(self, path):
self.path = path
self._connect()
# load in file_mode
if self.module.params['file_mode']:
try:
f = open(self.module.params['config_file'], 'r')
running = f.read()
f.close()
except IOError as e:
self.module.fail_json(msg='Error reading configuration file. %s' % to_text(e),
exception=traceback.format_exc())
self.forti_device.load_config(config_text=running, path=path)
else:
# get config
try:
self.forti_device.load_config(path=path)
except Exception as e:
self.forti_device.close()
self.module.fail_json(msg='Error reading running config. %s' % to_text(e),
exception=traceback.format_exc())
# set configs in object
self.result['running_config'] = self.forti_device.running_config.to_text()
self.candidate_config = self.forti_device.candidate_config
# backup if needed
if self.module.params['backup']:
backup(self.module, self.forti_device.running_config.to_text())
def apply_changes(self):
change_string = self.forti_device.compare_config()
if change_string:
self.result['change_string'] = change_string
self.result['changed'] = True
# Commit if not check mode
if change_string and not self.module.check_mode:
if self.module.params['file_mode']:
try:
f = open(self.module.params['config_file'], 'w')
f.write(self.candidate_config.to_text())
f.close()
except IOError as e:
self.module.fail_json(msg='Error writing configuration file. %s' %
to_text(e), exception=traceback.format_exc())
else:
try:
self.forti_device.commit()
except FailedCommit as e:
# Something's wrong (rollback is automatic)
self.forti_device.close()
error_list = self.get_error_infos(e)
self.module.fail_json(msg_error_list=error_list, msg="Unable to commit change, check your args, the error was %s" % e.message)
self.forti_device.close()
self.module.exit_json(**self.result)
def del_block(self, block_id):
self.forti_device.candidate_config[self.path].del_block(block_id)
def add_block(self, block_id, block):
self.forti_device.candidate_config[self.path][block_id] = block
def get_error_infos(self, cli_errors):
error_list = []
for errors in cli_errors.args:
for error in errors:
error_code = error[0]
error_string = error[1]
error_type = fortios_error_codes.get(error_code, "unknown")
error_list.append(dict(error_code=error_code, error_type=error_type, error_string=error_string))
return error_list
def get_empty_configuration_block(self, block_name, block_type):
return FortiConfig(block_name, block_type)
# END DEPRECATED

View File

@@ -0,0 +1,32 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
secret_fields = [
"kerberos_keytab", "ldap_password", "password", "private_key", "scep_password", "enckey",
"keytab", "server_keytab", "admin_password", "preshared_key", "forticlient_reg_key",
"aaa_shared_secret", "ha_shared_secret", "login_password", "modem_passwd", "ppp_password",
"ssh_host_key", "mmsc_password", "firewall_ssh_host_key", "firewall_ssh_local_key",
"hostkey_dsa1024", "hostkey_ecdsa256", "hostkey_ecdsa384", "hostkey_ecdsa521", "hostkey_ed25519",
"hostkey_rsa2048", "uploadpass", "server_key", "auth_keychain_l1", "auth_keychain_l2",
"auth_password_l1", "auth_password_l2", "authentication_key", "key_string", "keychain", "md5_key",
"md5_keychain", "md5_keys", "auth_key", "enc_key", "ipsec_keys", "key_rollover_interval", "privatekey",
"alicloud_access_key_secret", "access_token", "fixed_key", "group_password", "ddns_key", "ddns_password",
"proxy_password", "auth_password", "key_inbound", "key_outbound", "pptp_password", "passwd", "key",
"access_key", "api_key", "client_secret", "key_passwd", "secret_key", "secret_token", "vcenter_password",
"password2", "password3", "password4", "password5", "user_krb_keytab", "account_key_filter",
"fortipresence_secret", "login_passwd", "sam_cwp_password", "sam_password", "wan_port_auth_password",
"captive_portal_macauth_radius_secret", "captive_portal_radius_secret", "ft_r0_key_lifetime",
"gtk_rekey_intv", "keyindex", "mpsk_key", "passphrase", "ptk_rekey_intv", "sae_password", "inter_controller_key",
"passwd_value", "keyword_match", "sso_password", "logon_password", "keylifeseconds", "keylifekbs",
"psksecret", "keylife", "ppk_secret", "psksecret_remote", "authpasswd", "group_authentication_secret",
"vpn_ipsec_manualkey_interface", "authkey", "vpn_ipsec_manualkey", "scep_password", "videofilter_youtube_key",
]
def is_secret_field(key_name):
# for patch in secret_fields:
# if patch in key_name:
if key_name in secret_fields:
return True
return False

Some files were not shown because too many files have changed in this diff Show More