sophos.sophos_firewall.sfos_admin_settings module – Manage Admin and user settings (System > Administration)

Note

This module is part of the sophos.sophos_firewall collection (version 2.0.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install sophos.sophos_firewall. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: sophos.sophos_firewall.sfos_admin_settings.

New in sophos.sophos_firewall 1.0.0

Synopsis

  • Manage settings under System > Administration > Admin and user settings on Sophos Firewall

Requirements

The below requirements are needed on the host that executes this module.

  • sophosfirewall-python

  • Beginning in version 2.0.0, this module requires use of an httpapi connection plugin. See the HTTPAPI example for details.

Parameters

Parameter

Comments

hostname_settings

dictionary

Hostname settings.

description

string

Description field in the hostname settings

hostname

string

Hostname of the firewall

login_disclaimer

string

Enable/Disable the login disclaimer

Choices:

  • "Enable"

  • "Disable"

login_security

dictionary

Login security settings

block_login

string

Enable to block Admin login after configured number of failed attempts within configured time span.

Choices:

  • "Enable"

  • "Disable"

duration

string

Time span within which if Admin Login attempts exceed configured Unsuccessful Attempts, then Admin Login gets blocked. (1-120 seconds).

logout_session

string

Enable to logout Admin Session after configured timeout. Specify number of minutes to enable (1-120)

minutes

string

Time interval for which Admin Login is blocked (1-60 minutes)

unsuccessful_attempt

string

Number of unsuccessful attempts

password_complexity

dictionary

Password complexity settings

complexity_check

string

Enable/Disable complexity check

Choices:

  • "Enable"

  • "Disable"

enforce_min_length

string

Enable/Disable enforcement of minimum password length

Choices:

  • "Enable"

  • "Disable"

include_alpha

string

Enable/Disable special character requirement

Choices:

  • "Enable"

  • "Disable"

include_numeric

string

Enable/Disable special character requirement

Choices:

  • "Enable"

  • "Disable"

include_special

string

Enable/Disable special character requirement

Choices:

  • "Enable"

  • "Disable"

min_length

string

Minimum password length

state

string / required

Use query to retrieve or updated to modify

Choices:

  • "updated"

  • "query"

webadmin_settings

dictionary

Web admin settings

certificate

string

Certificate used for the admin interface

https_port

string

HTTPS port for the administrative interface

portal_custom_hostname

string

Custom portal hostname

portal_redirect_mode

string

Redirect mode

Choices:

  • "ip"

userportal_https_port

string

HTTPS port for the user portal

vpnportal_https_port

string

HTTPS port for the VPN portal

Examples

- name: Update hostname settings
  sophos.sophos_firewall.sfos_admin_settings:
    hostname_settings:
        hostname: sophos-firewall-dev1
        description: Automation Testing 1
    state: updated

- name: Update webadmin settings
  sophos.sophos_firewall.sfos_admin_settings:
    webadmin_settings:
        vpnportal_https_port: 444
        userportal_https_port: 4445
    state: updated

- name: Update loginsecurity settings
  sophos.sophos_firewall.sfos_admin_settings:
    login_security:
        logout_session: 120
        block_login: Enable
        unsuccessful_attempt: 3
        duration: 30
        minutes: 1
    state: updated

- name: Update administrator password complexity settings
  sophos.sophos_firewall.sfos_admin_settings:
    password_complexity:
        complexity_check: Enable
        enforce_min_length: Enable
        include_alpha: Enable
        include_numeric: Enable
        include_special: Enable
        min_length: 10
    state: updated

- name: Update login disclaimer
  sophos.sophos_firewall.sfos_admin_settings:
    login_disclaimer: Enable
    state: updated

- name: Query admin settings
  sophos.sophos_firewall.sfos_admin_settings:
    state: query

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

api_response

dictionary

Serialized object containing the API response.

Returned: always

Authors

  • Matt Mullen (@mamullen13316)