fmgr_system_admin_profile – Admin profile.
Added in version 2.0.0.
Warning
Starting in version 3.0.0, all input arguments will be named using the underscore naming convention (snake_case).
Argument name before 3.0.0:
var-name
,var name
,var.name
New argument name starting in 3.0.0:
var_name
FortiManager Ansible v2.4+ supports both previous argument name and new underscore name. You will receive deprecation warnings if you keep using the previous argument name. You can ignore the warning by setting deprecation_warnings=False in ansible.cfg.
Synopsis
This module is able to configure a FortiManager device.
Examples include all parameters and values need to be adjusted to data sources before usage.
Tested with FortiManager v7.x.
Requirements
The below requirements are needed on the host that executes this module.
ansible>=2.15.0
FortiManager Version Compatibility
Supported Version Ranges: v6.0.0 -> latest
Parameters
- access_token -The token to access FortiManager without using username and password. type: str required: false
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
- system_admin_profile - Admin profile. type: dict
- adom_lock (Alias name: adom-lock) Adom locking type: str choices: [none, read, read-write] default: none more...
- adom_policy_packages (Alias name: adom-policy-packages) Adom policy packages. type: str choices: [none, read, read-write] default: none more...
- adom_switch (Alias name: adom-switch) Administrator domain. type: str choices: [none, read, read-write] default: none more...
- app_filter (Alias name: app-filter) App filter. type: str choices: [disable, enable] default: disable more...
- assignment Assignment permission. type: str choices: [none, read, read-write] default: none more...
- change_password (Alias name: change-password) Enable/disable restricted user to change self password. type: str choices: [disable, enable] default: disable more...
- config_retrieve (Alias name: config-retrieve) Configuration retrieve. type: str choices: [none, read, read-write] default: none more...
- config_revert (Alias name: config-revert) Revert configuration from revision history type: str choices: [none, read, read-write] default: none more...
- consistency_check (Alias name: consistency-check) Consistency check. type: str choices: [none, read, read-write] default: none more...
- datamask Enable/disable data masking. type: str choices: [disable, enable] default: disable more...
- datamask_custom_fields (Alias name: datamask-custom-fields) Datamask custom fields. type: list
more...
- field_category (Alias name: field-category) Field categories. type: list choices: [log, fortiview, alert, ueba, all] more...
- field_name (Alias name: field-name) Field name. type: str more...
- field_status (Alias name: field-status) Field status. type: str choices: [disable, enable] default: enable more...
- field_type (Alias name: field-type) Field type. type: str choices: [string, ip, mac, email, unknown] default: string more...
- datamask_custom_priority (Alias name: datamask-custom-priority) Prioritize custom fields. type: str choices: [disable, enable] default: disable more...
- datamask_fields (Alias name: datamask-fields) Data masking fields. type: list choices: [user, srcip, srcname, srcmac, dstip, dstname, email, message, domain] more...
- datamask_key (Alias name: datamask-key) Data masking encryption key. type: list more...
- deploy_management (Alias name: deploy-management) Install to devices. type: str choices: [none, read, read-write] default: none more...
- description Description. type: str more...
- device_ap (Alias name: device-ap) Manage ap. type: str choices: [none, read, read-write] default: none more...
- device_config (Alias name: device-config) Manage device configurations. type: str choices: [none, read, read-write] default: none more...
- device_forticlient (Alias name: device-forticlient) Manage forticlient. type: str choices: [none, read, read-write] default: none more...
- device_fortiswitch (Alias name: device-fortiswitch) Manage fortiswitch. type: str choices: [none, read, read-write] default: none more...
- device_manager (Alias name: device-manager) Device manager. type: str choices: [none, read, read-write] default: none more...
- device_op (Alias name: device-op) Device add/delete/edit. type: str choices: [none, read, read-write] default: none more...
- device_policy_package_lock (Alias name: device-policy-package-lock) Device/policy package locking type: str choices: [none, read, read-write] default: none more...
- device_profile (Alias name: device-profile) Device profile permission. type: str choices: [none, read, read-write] default: none more...
- device_revision_deletion (Alias name: device-revision-deletion) Delete device revision. type: str choices: [none, read, read-write] default: none more...
- device_wan_link_load_balance (Alias name: device-wan-link-load-balance) Manage wan link load balance. type: str choices: [none, read, read-write] default: none more...
- event_management (Alias name: event-management) Event management. type: str choices: [none, read, read-write] default: none more...
- fgd_center_advanced (Alias name: fgd-center-advanced) Fortiguard center advanced. type: str choices: [none, read, read-write] default: none more...
- fgd_center_fmw_mgmt (Alias name: fgd-center-fmw-mgmt) Fortiguard center firmware management. type: str choices: [none, read, read-write] default: none more...
- fgd_center_licensing (Alias name: fgd-center-licensing) Fortiguard center licensing. type: str choices: [none, read, read-write] default: none more...
- fgd_center Fortiguard center. type: str choices: [none, read, read-write] default: none more...
- global_policy_packages (Alias name: global-policy-packages) Global policy packages. type: str choices: [none, read, read-write] default: none more...
- import_policy_packages (Alias name: import-policy-packages) Import policy package. type: str choices: [none, read, read-write] default: none more...
- intf_mapping (Alias name: intf-mapping) Interface mapping type: str choices: [none, read, read-write] default: none more...
- ips_filter (Alias name: ips-filter) Ips filter. type: str choices: [disable, enable] default: disable more...
- log_viewer (Alias name: log-viewer) Log viewer. type: str choices: [none, read, read-write] default: none more...
- policy_objects (Alias name: policy-objects) Policy objects permission. type: str choices: [none, read, read-write] default: none more...
- profileid Profile id. type: str more...
- read_passwd (Alias name: read-passwd) View password in clear text. type: str choices: [none, read, read-write] default: none more...
- realtime_monitor (Alias name: realtime-monitor) Realtime monitor. type: str choices: [none, read, read-write] default: none more...
- report_viewer (Alias name: report-viewer) Report viewer. type: str choices: [none, read, read-write] default: none more...
- scope Scope. type: str choices: [global, adom] default: global more...
- set_install_targets (Alias name: set-install-targets) Edit installation targets. type: str choices: [none, read, read-write] default: none more...
- system_setting (Alias name: system-setting) System setting. type: str choices: [none, read, read-write] default: none more...
- term_access (Alias name: term-access) Terminal access. type: str choices: [none, read, read-write] default: none more...
- type Profile type. type: str choices: [system, restricted] default: system more...
- vpn_manager (Alias name: vpn-manager) Vpn manager. type: str choices: [none, read, read-write] default: none more...
- web_filter (Alias name: web-filter) Web filter. type: str choices: [disable, enable] default: disable more...
- datamask_unmasked_time (Alias name: datamask-unmasked-time) Time in days without data masking. type: int default: 0 more...
- super_user_profile (Alias name: super-user-profile) Enable/disable super user profile type: str choices: [disable, enable] default: disable more...
- allow_to_install (Alias name: allow-to-install) Enable/disable the restricted user to install objects to the devices. type: str choices: [disable, enable] default: enable more...
- extension_access (Alias name: extension-access) Manage extension access. type: str choices: [none, read, read-write] default: none more...
- fabric_viewer (Alias name: fabric-viewer) Fabric viewer. type: str choices: [none, read, read-write] default: none more...
- run_report (Alias name: run-report) Run reports. type: str choices: [none, read, read-write] default: none more...
- script_access (Alias name: script-access) Script access. type: str choices: [none, read, read-write] default: none more...
- triage_events (Alias name: triage-events) Triage events. type: str choices: [none, read, read-write] default: none more...
- update_incidents (Alias name: update-incidents) Create/update incidents. type: str choices: [none, read, read-write] default: none more...
- ips_objects (Alias name: ips-objects) Ips objects configuration. type: str choices: [none, read, read-write] default: none more...
- ipv6_trusthost1 Admin user trusted host ipv6, default ::/0 for all. type: str default: ::/0 more...
- ipv6_trusthost10 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost2 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost3 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost4 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost5 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost6 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost7 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost8 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- ipv6_trusthost9 Admin user trusted host ipv6, default ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 for none. type: str default: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128 more...
- rpc_permit (Alias name: rpc-permit) Set none/read/read-write rpc-permission type: str choices: [read-write, none, read] default: none more...
- trusthost1 Admin user trusted host ip, default 0. type: str default: 0.0.0.0 0.0.0.0 more...
- trusthost10 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost2 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost3 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost4 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost5 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost6 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost7 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost8 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- trusthost9 Admin user trusted host ip, default 255. type: str default: 255.255.255.255 255.255.255.255 more...
- ips_baseline_cfg (Alias name: ips-baseline-cfg) Ips baseline sensor configration. type: str choices: [none, read, read-write] default: none more...
- ips_baseline_ovrd (Alias name: ips-baseline-ovrd) Enable/disable override baseline ips sensor. type: str choices: [disable, enable] default: disable more...
- device_fortiextender (Alias name: device-fortiextender) Manage fortiextender. type: str choices: [none, read, read-write] default: none more...
- ips_lock (Alias name: ips-lock) Ips locking type: str choices: [none, read, read-write] default: none more...
- fgt_gui_proxy (Alias name: fgt-gui-proxy) Fortigate gui proxy. type: str choices: [disable, enable] default: disable more...
- policy_ips_attrs (Alias name: policy-ips-attrs) Policy ips attributes configuration. type: str choices: [none, read, read-write] default: none more...
- write_passwd_access (Alias name: write-passwd-access) Set all/specify-by-user/specify-by-profile write password access mode. type: str choices: [all, specify-by-user, specify-by-profile] default: all more...
- write_passwd_profiles (Alias name: write-passwd-profiles) Write passwd profiles. type: list
more...
- profileid Profile id. type: str more...
- write_passwd_user_list (Alias name: write-passwd-user-list) Write passwd user list. type: list
more...
- userid User id. type: str more...
- adom_admin (Alias name: adom-admin) Enable adom admin. type: str choices: [disable, enable] default: disable more...
Notes
Note
Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
To create or update an object, use state: present directive.
To delete an object, use state: absent directive
Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples
- name: Example playbook
hosts: fortimanagers
connection: httpapi
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Admin profile.
fortinet.fortimanager.fmgr_system_admin_profile:
bypass_validation: false
state: present
system_admin_profile:
description: ansible-test-description
profileid: ansible-test-profile
scope: adom # <value in [global, adom]>
type: system # <value in [system, restricted]>
- name: Gathering fortimanager facts
hosts: fortimanagers
gather_facts: false
connection: httpapi
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Retrieve all the admin profiles
fortinet.fortimanager.fmgr_fact:
facts:
selector: "system_admin_profile"
params:
profile: "your_value"
Return Values
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
- meta - The result of the request.returned: always type: dict
- request_url - The full url requested. returned: always type: str sample: /sys/login/user
- response_code - The status of api request. returned: always type: int sample: 0
- response_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
This module is not guaranteed to have a backwards compatible interface.