fmgd_webproxy_explicitproxy – Device vdom web proxy explicit proxy.

Added in version 1.1.0.

Synopsis

  • This module is able to configure a FortiManager device (FortiProxy).

  • 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-core>=2.16.0

FortiManager Version Compatibility

Supported Version Ranges: v7.4.8 -> v7.4.10, v7.6.4 -> 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
  • device - The parameter in requested url type: str required: true
  • vdom - The parameter in requested url type: str required: true
  • webproxy_explicitproxy - Device vdom web proxy explicit proxy type: dict
    • detect_https_in_http_request (Alias name: detect-https-in-http-request) Detect https in http request. type: str choices: [disable, enable] more...
    • dns_mode (Alias name: dns-mode) Dns mode. type: str choices: [recursive, non-recursive, forward-only] more...
    • dstport_from_incoming (Alias name: dstport-from-incoming) Dstport from incoming. type: str choices: [disable, enable] more...
    • ftp_incoming_port (Alias name: ftp-incoming-port) Ftp incoming port. type: list more...
    • ftp_over_http (Alias name: ftp-over-http) Ftp over http. type: str choices: [disable, enable] more...
    • header_proxy_agent (Alias name: header-proxy-agent) Header proxy agent. type: str choices: [disable, enable] more...
    • http Http. type: str choices: [disable, enable] more...
    • http_connection_mode (Alias name: http-connection-mode) Http connection mode. type: str choices: [static, multiplex, serverpool] more...
    • http_incoming_port (Alias name: http-incoming-port) Http incoming port. type: list more...
    • https_incoming_port (Alias name: https-incoming-port) Https incoming port. type: list more...
    • incoming_ip6 (Alias name: incoming-ip6) Incoming ip6. type: str more...
    • interface Interface. type: list more...
    • ipv6_status (Alias name: ipv6-status) Ipv6 status. type: str choices: [disable, enable] more...
    • learn_dst_from_sni (Alias name: learn-dst-from-sni) Learn dst from sni. type: str choices: [disable, enable] more...
    • name Name. type: str more...
    • pac_file_data (Alias name: pac-file-data) Pac file data. type: str more...
    • pac_file_name (Alias name: pac-file-name) Pac file name. type: str more...
    • pac_file_server_port (Alias name: pac-file-server-port) Pac file server port. type: str more...
    • pac_file_server_status (Alias name: pac-file-server-status) Pac file server status. type: str choices: [disable, enable] more...
    • pac_file_through_https (Alias name: pac-file-through-https) Pac file through https. type: str choices: [disable, enable] more...
    • pac_file_url (Alias name: pac-file-url) Pac file url. type: str more...
    • pref_dns_result (Alias name: pref-dns-result) Pref dns result. type: str choices: [ipv4, ipv6, ipv4-strict, ipv6-strict] more...
    • realm Realm. type: str more...
    • return_to_sender (Alias name: return-to-sender) Return to sender. type: str choices: [disable, enable] more...
    • sec_default_action (Alias name: sec-default-action) Sec default action. type: str choices: [deny, accept] more...
    • secure_web_proxy (Alias name: secure-web-proxy) Secure web proxy. type: str choices: [disable, enable, secure] more...
    • secure_web_proxy_cert (Alias name: secure-web-proxy-cert) Secure web proxy cert. type: list more...
    • socks Socks. type: str choices: [disable, enable] more...
    • socks_incoming_port (Alias name: socks-incoming-port) Socks incoming port. type: list more...
    • ssl_algorithm (Alias name: ssl-algorithm) Ssl algorithm. type: str choices: [high, low, medium] more...
    • ssl_dh_bits (Alias name: ssl-dh-bits) Ssl dh bits. type: str choices: [768, 1024, 1536, 2048] more...
    • status Status. type: str choices: [disable, enable] more...
    • unknown_http_version (Alias name: unknown-http-version) Unknown http version. type: str choices: [best-effort, reject] more...
    • incoming_ip (Alias name: incoming-ip) Incoming ip. type: str more...
    • client_cert (Alias name: client-cert) Client cert. type: str choices: [disable, enable] more...
    • empty_cert_action (Alias name: empty-cert-action) Empty cert action. type: str choices: [block, accept, accept-unmanageable] more...
    • user_agent_detect (Alias name: user-agent-detect) User agent detect. type: str choices: [disable, enable] 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 (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  gather_facts: false
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Device vdom web proxy explicit proxy
      fortinet.fmgdevice.fmgd_webproxy_explicitproxy:
        # bypass_validation: false
        # workspace_locking_adom: <global or your adom name>
        # workspace_locking_timeout: 300
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        device: <your own value>
        vdom: <your own value>
        state: present # <value in [present, absent]>
        webproxy_explicitproxy:
          name: "your value" # Required variable, string
          # detect_https_in_http_request: <value in [disable, enable]>
          # dns_mode: <value in [recursive, non-recursive, forward-only]>
          # dstport_from_incoming: <value in [disable, enable]>
          # ftp_incoming_port: <list or string>
          # ftp_over_http: <value in [disable, enable]>
          # header_proxy_agent: <value in [disable, enable]>
          # http: <value in [disable, enable]>
          # http_connection_mode: <value in [static, multiplex, serverpool]>
          # http_incoming_port: <list or string>
          # https_incoming_port: <list or string>
          # incoming_ip6: <string>
          # interface: <list or string>
          # ipv6_status: <value in [disable, enable]>
          # learn_dst_from_sni: <value in [disable, enable]>
          # pac_file_data: <string>
          # pac_file_name: <string>
          # pac_file_server_port: <string>
          # pac_file_server_status: <value in [disable, enable]>
          # pac_file_through_https: <value in [disable, enable]>
          # pac_file_url: <string>
          # pref_dns_result: <value in [ipv4, ipv6, ipv4-strict, ...]>
          # realm: <string>
          # return_to_sender: <value in [disable, enable]>
          # sec_default_action: <value in [deny, accept]>
          # secure_web_proxy: <value in [disable, enable, secure]>
          # secure_web_proxy_cert: <list or string>
          # socks: <value in [disable, enable]>
          # socks_incoming_port: <list or string>
          # ssl_algorithm: <value in [high, low, medium]>
          # ssl_dh_bits: <value in [768, 1024, 1536, ...]>
          # status: <value in [disable, enable]>
          # unknown_http_version: <value in [best-effort, reject]>
          # incoming_ip: <string>
          # client_cert: <value in [disable, enable]>
          # empty_cert_action: <value in [block, accept, accept-unmanageable]>
          # user_agent_detect: <value in [disable, enable]>

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.

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)