fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_cifs 模块 – 配置 CIFS 协议选项。

注意

此模块是 fortinet.fortimanager 集合(版本 2.8.2)的一部分。

如果您使用的是 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install fortinet.fortimanager

要在 Playbook 中使用它,请指定:fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_cifs

fortinet.fortimanager 2.1.0 中的新增功能

概要

  • 此模块能够配置 FortiManager 设备。

  • 示例包括所有参数和值,这些参数和值在使用前需要调整为数据源。

参数

参数

注释

access_token

字符串

用于在不使用用户名和密码的情况下访问 FortiManager 的令牌。

adom

字符串 / 必需

请求 URL 中的参数 (adom)。

bypass_validation

布尔值

仅当模块模式与 FortiManager API 结构不同时设置为 True,模块继续执行而不验证参数。

选择

  • false ←(默认)

  • true

enable_log

布尔值

启用/禁用任务的日志记录。

选择

  • false ←(默认)

  • true

firewall_profileprotocoloptions_cifs

字典

设置的顶级参数。

domain_controller

别名:domain-controller

字符串

用于解密 CIFS 流量的域。

file_filter

别名:file-filter

字典

文件过滤器。

entries

列表 / 元素=字典

条目。

action

字符串

对匹配的文件采取的操作。

选择

  • "log"

  • "block"

comment

字符串

注释。

direction

字符串

匹配在会话的起始或回复方向上传输的文件。

选择

  • "any"

  • "incoming"

  • "outgoing"

file_type

别名:file-type

any

(列表)选择文件类型。

filter

字符串

添加文件过滤器。

protocol

列表 / 元素=字符串

要应用的协议。

选择

  • "cifs"

log

字符串

启用/禁用文件过滤器日志记录。

选择

  • "disable"

  • "enable"

status

字符串

启用/禁用文件过滤器。

选择

  • "disable"

  • "enable"

options

列表 / 元素=字符串

可以应用于会话的一个或多个选项。

选择

  • "oversize"

oversize_limit

别名:oversize-limit

整数

可以扫描的最大内存中文件大小

ports

any

(列表)要扫描内容的端口

scan_bzip2

别名:scan-bzip2

字符串

启用/禁用 BZip2 压缩文件的扫描。

选择

  • "disable"

  • "enable"

server_credential_type

别名:server-credential-type

字符串

CIFS 服务器凭据类型。

选择

  • "none"

  • "credential-replication"

  • "credential-keytab"

server_keytab

别名:server-keytab

列表 / 元素=字典

服务器 keytab。

keytab

字符串

包含服务器凭据的 Base64 编码 keytab 文件。

password

any

(列表)keytab 的密码。

principal

字符串

服务主体。

status

字符串

启用/禁用此协议的扫描的活动状态。

选择

  • "disable"

  • "enable"

tcp_window_maximum

别名:tcp-window-maximum

整数

最大动态 TCP 窗口大小

tcp_window_minimum

别名:tcp-window-minimum

整数

最小动态 TCP 窗口大小

tcp_window_size

别名:tcp-window-size

整数

设置 TCP 静态窗口大小

tcp_window_type

别名:tcp-window-type

字符串

指定此协议使用的 TCP 窗口类型。

选择

  • "system"

  • "static"

  • "dynamic"

  • "auto-tuning"

uncompressed_nest_limit

别名: uncompressed-nest-limit

整数

可解压和扫描的最大压缩嵌套层级

uncompressed_oversize_limit

别名: uncompressed-oversize-limit

整数

可扫描的最大内存中未压缩文件大小

forticloud_access_token

字符串

使用 FortiCloud API 访问令牌验证 Ansible 客户端。

profile-protocol-options

字符串

已弃用,请使用 “profile_protocol_options”

profile_protocol_options

字符串

请求的 URL 中的参数 (profile-protocol-options)。

proposed_method

字符串

底层 Json RPC 请求的覆盖方法。

选择

  • "update"

  • "set"

  • "add"

rc_failed

list / elements=integer

将覆盖失败条件的返回码列表。

rc_succeeded

list / elements=integer

将覆盖成功条件的返回码列表。

workspace_locking_adom

字符串

用于在工作区模式下运行的 FortiManager 的锁定 ADOM,该值可以是 global 以及包括 root 的其他值。

workspace_locking_timeout

整数

等待其他用户释放工作区锁定的最大时间(以秒为单位)。

默认值: 300

说明

注意

  • 从 2.4.0 版本开始,所有输入参数都使用下划线命名约定 (snake_case)。请将 “var-name” 之类的参数更改为 “var_name”。旧的参数名称仍然可用,但您将收到弃用警告。您可以在 ansible.cfg 中设置 deprecation_warnings=False 来忽略此警告。

  • 此 FortiManager 模块支持在工作区锁定模式下运行,顶层参数 workspace_locking_adom 和 workspace_locking_timeout 有助于完成这项工作。

  • 通常,当返回非零返回码时,运行一个模块可能会失败。您还可以使用参数 rc_failed 和 rc_succeeded 覆盖失败或成功的条件。

示例

- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure CIFS protocol options.
      fortinet.fortimanager.fmgr_firewall_profileprotocoloptions_cifs:
        # bypass_validation: false
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        adom: <your own value>
        profile_protocol_options: <your own value>
        firewall_profileprotocoloptions_cifs:
          ports: <list or integer>
          status: <value in [disable, enable]>
          options:
            - "oversize"
          oversize_limit: <integer>
          scan_bzip2: <value in [disable, enable]>
          tcp_window_maximum: <integer>
          tcp_window_minimum: <integer>
          tcp_window_size: <integer>
          tcp_window_type: <value in [system, static, dynamic, ...]>
          uncompressed_nest_limit: <integer>
          uncompressed_oversize_limit: <integer>
          domain_controller: <string>
          file_filter:
            entries:
              -
                action: <value in [log, block]>
                comment: <string>
                direction: <value in [any, incoming, outgoing]>
                file_type: <list or string>
                filter: <string>
                protocol:
                  - "cifs"
            log: <value in [disable, enable]>
            status: <value in [disable, enable]>
          server_credential_type: <value in [none, credential-replication, credential-keytab]>
          server_keytab:
            -
              keytab: <string>
              password: <list or string>
              principal: <string>

返回值

通用返回值记录在此处这里,以下是此模块独有的字段

描述

meta

字典

请求的结果。

返回: 总是

request_url

字符串

请求的完整 URL。

返回: 总是

示例: "/sys/login/user"

response_code

整数

API 请求的状态。

返回: 总是

示例: 0

response_data

列表 / 元素=字符串

API 响应。

返回: 总是

response_message

字符串

API 响应的描述性消息。

返回: 总是

示例: "OK."

system_information

字典

目标系统的信息。

返回: 总是

rc

整数

请求的状态。

返回: 总是

示例: 0

version_check_warning

列表 / 元素=字符串

如果 playbook 中使用的参数不受当前 FortiManager 版本支持,则发出警告。

返回: 复杂

作者

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)