puzzle.opnsense.system_access_users module – Manage OPNsense users

Note

This module is part of the puzzle.opnsense collection (version 1.1.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 puzzle.opnsense.

To use it in a playbook, specify: puzzle.opnsense.system_access_users.

New in puzzle.opnsense 1.0.0

Synopsis

  • This module allows you to manage users on an OPNsense firewall.

Parameters

Parameter

Comments

apikeys

list / elements=string

A list of apikeys for an OPNsense User. Generates new apikey if “” is provided.

authorizedkeys

string

The authorizedkeys of a OPNsense user.

comment

string

Additional comments or notes for the OPNsense user.

disabled

boolean

Indicates whether the user account should be disabled.

Choices:

  • false ← (default)

  • true

email

string

The email address of the OPNsense user.

expires

string

The expiration date for the OPNsense user account.

full_name

string

The full name of the OPNsense user.

groups

list / elements=string

A list of groups the OPNsense user belongs to.

landing_page

string

The landing page for the OPNsense user.

otp_seed

string

The otp_seed of a OPNsense user.

password

string / required

The password of the OPNsense user.

scope

string

The scope of the OPNsense user.

shell

string

The shell for the OPNsense user.

state

string

The desired state of the OPNsense user.

Choices:

  • "present" ← (default)

  • "absent"

uid

string

The UID of the OPNsense user.

username

string / required

The username of the OPNsense user.

Examples

- name: Add OPNsense user
  puzzle.opnsense.system_access_users:
    username: johndoe
    password: secret
    full_name: John Doe
    email: johndoe@example.com
    groups:
      - admins
    state: present
  register: result

- name: Remove OPNsense user
  puzzle.opnsense.system_access_users:
    username: johndoe
    state: absent
  register: result

Return Values

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

Key

Description

opnsense_configure_output

list / elements=string

A List of the executed OPNsense configure function along with their respective stdout, stderr and rc

Returned: always

Sample: [{"function": "opnsense_configure_output", "params": [], "rc": 0, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}]

Authors

  • Kilian Soltermann (@killuuuhh)