fortinet.fortimanager.fmgr_system_admin_profile 模块 – 管理员配置文件。
注意
此模块是 fortinet.fortimanager 集合(版本 2.8.2)的一部分。
如果您使用的是 ansible
包,您可能已经安装了这个集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install fortinet.fortimanager
。
要在 playbook 中使用它,请指定:fortinet.fortimanager.fmgr_system_admin_profile
。
fortinet.fortimanager 2.0.0 中的新增功能
概要
此模块能够配置 FortiManager 设备。
示例包括所有参数和值,这些参数和值在使用前需要调整为数据源。
参数
参数 |
注释 |
---|---|
用于在不使用用户名和密码的情况下访问 FortiManager 的令牌。 |
|
仅当模块模式与 FortiManager API 结构不同时才设置为 True,模块将继续执行而不验证参数。 选择
|
|
启用/禁用任务日志记录。 选择
|
|
使用 forticloud API 访问令牌验证 Ansible 客户端。 |
|
底层 Json RPC 请求的覆盖方法。 选择
|
|
将覆盖失败条件的 rc 代码列表。 |
|
将覆盖成功条件的 rc 代码列表。 |
|
用于创建、更新或删除对象的指令。 选择
|
|
设置的顶级参数。 |
|
启用 Adom 管理员。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
ADOM 锁定 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
ADOM 策略包。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理员域。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
启用/禁用受限用户将对象安装到设备。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
应用过滤器。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
分配权限。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
启用/禁用受限用户更改自己的密码。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
配置检索。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
从修订历史还原配置 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
一致性检查。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
启用/禁用数据屏蔽。 disable - 禁用数据屏蔽。 enable - 启用数据屏蔽。 选择
|
|
数据屏蔽自定义字段。 |
|
字段类别。 log - 日志。 fortiview - FortiView。 alert - 事件管理。 ueba - UEBA。 all - 全部。 选择
|
|
字段名称。 |
|
字段状态。 disable - 禁用字段。 enable - 启用字段。 选择
|
|
字段类型。 string - 字符串。 ip - IP。 mac - MAC 地址。 email - 电子邮件地址。 unknown - 未知。 选择
|
|
确定自定义字段的优先级。 disable - 禁用自定义字段搜索优先级。 enable - 启用自定义字段搜索优先级。 选择
|
|
数据屏蔽字段。 user - 用户名。 srcip - 源 IP 地址。 srcname - 源名称。 srcmac - 源 MAC 地址。 dstip - 目标 IP 地址。 dstname - 目标名称。 email - 电子邮件。 message - 消息。 domain - 域名。 选择
|
|
(list) 数据掩码加密密钥。 |
|
不进行数据掩码的天数。 |
|
安装到设备。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
描述。 |
|
管理 AP。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理设备配置。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理 FortiClient。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理 FortiExtender。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理 FortiSwitch。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
设备管理器。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
设备添加/删除/编辑。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
设备/策略包锁定 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
设备配置文件权限。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
删除设备修订版本。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理 WAN 链路负载均衡。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
事件管理。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理扩展访问。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
Fabric 查看器。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
FortiGuard 中心。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
FortiGuard 中心高级。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
FortiGuard 中心固件管理。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
FortiGuard 中心许可。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
FortiGate GUI 代理。 disable - 无权限。 enable - 有权限。 选择
|
|
全局策略包。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
导入策略包。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
接口映射 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
IPS 基线传感器配置。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
启用/禁用覆盖基线 IPS 传感器。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
IPS 过滤器。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
IPS 锁定 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
IPS 对象配置。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理员用户可信主机 IPv6,默认值。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
管理员用户可信主机 IPv6,默认值 ffff。 |
|
日志查看器。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
策略 IPS 属性配置。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
策略对象权限。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
配置文件 ID。 |
|
以明文查看密码。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
实时监控。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
报表查看器。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
设置 none/read/read-write RPC 权限。 read-write - 读取-写入权限。 none - 无权限。 read - 只读权限。 选择
|
|
运行报表。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
范围。 global - 全局范围。 adom - ADOM 范围。 选择
|
|
脚本访问。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
编辑安装目标。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
启用/禁用超级用户配置文件 disable - 禁用超级用户配置文件 enable - 启用超级用户配置文件 选择
|
|
系统设置。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
终端访问。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
分类事件。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
管理员用户可信主机 IP,默认值 0。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
管理员用户可信主机 IP,默认值 255。 |
|
配置文件类型。 system - 系统管理员。 restricted - 受限管理员。 选择
|
|
创建/更新事件。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
VPN 管理器。 none - 无权限。 read - 读取权限。 read-write - 读取-写入权限。 选择
|
|
Web 过滤器。 disable - 禁用设置。 enable - 启用设置。 选择
|
|
设置所有/按用户指定/按配置文件指定写入密码访问模式。 all - 除了超级用户之外的所有用户。 specify-by-user - 按用户指定。 specify-by-profile - 按配置文件指定。 选择
|
|
写入密码配置文件。 |
|
配置文件 ID。 |
|
写入密码用户列表。 |
|
用户 ID。 |
|
在工作区模式下运行的 FortiManager 要锁定的 ADOM,该值可以是 global 和其他值,包括 root。 |
|
等待其他用户释放工作区锁定的最长时间(以秒为单位)。 Default: |
Notes
注意
从 2.4.0 版本开始,所有输入参数都使用下划线命名约定 (snake_case) 命名。请将参数(例如“var-name”)更改为“var_name”。旧的参数名称仍然可用,但您将收到弃用警告。您可以在 ansible.cfg 中设置 deprecation_warnings=False 来忽略此警告。
此 FortiManager 模块支持在工作区锁定模式下运行,顶层参数 workspace_locking_adom 和 workspace_locking_timeout 可以帮助完成这项工作。
要创建或更新对象,请使用 state present 指令。
要删除对象,请使用 state absent 指令。
通常,当返回非零 rc 时,运行一个模块可能会失败。您还可以使用参数 rc_failed 和 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
常见的返回值已在此处记录 here,以下是此模块特有的字段
Key |
描述 |
---|---|
请求的结果。 Returned: always |
|
请求的完整 URL。 Returned: always Sample: |
|
api 请求的状态。 Returned: always 示例: |
|
api 响应。 Returned: always |
|
api 响应的描述性消息。 Returned: always 示例: |
|
目标系统的信息。 Returned: always |
|
请求的状态。 Returned: always 示例: |
|
如果 playbook 中使用的参数不被当前 FortiManager 版本支持,则会发出警告。 返回: 复杂类型 |