• Blog
  • Ansible community forum
  • Documentation
Ansible Logo
Ansible Collections Documentation
Ansible collections

Collections:

  • Collection Index
    • Collections in the Puzzle Namespace
      • Puzzle.Opnsense
        • Description
        • Collection Development Guide
        • Plugin Index

Plugin indexes:

  • Index of all Modules

Reference indexes:

  • Index of all Collection Environment Variables
Ansible collections
  • Collection Index
  • Collections in the Puzzle Namespace
  • Puzzle.Opnsense
  • puzzle.opnsense.system_settings_general module – Configure general settings mainly concern network-related settings like the hostname.
  • Edit on GitHub

puzzle.opnsense.system_settings_general module – Configure general settings mainly concern network-related settings like the hostname.

Note

This module is part of the puzzle.opnsense collection (version 1.5.0).

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_settings_general.

New in puzzle.opnsense 1.0.0

  • Synopsis

  • Parameters

  • Examples

  • Return Values

Synopsis

  • Module to configure general system settings

Parameters

Parameter

Comments

domain

string

The domain, e.g. mycorp.com, home, office, private, etc.

Do not use localas a domain name. It will cause local hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve local hosts not running mDNS.

hostname

string

Hostname without domain, e.g.: firewall

timezone

string

The timezone e.g. (Europe/Zurich, Etc/GMT+7, America/New_York, etc.

A list of valid timezones can be found in the OPNsense webui or in the /usr/share/zoneinfo/ directory on your OPNsense.

Examples

- name: Set hostname to opnsense
  puzzle.opnsense.system_settings_general:
    hostname: "opnsense"

- name: Set domain to mycorp.com
  puzzle.opnsense.system_settings_general:
    domain: mycorp.com

- name: Set timezone to Europe/Zurich
  puzzle.opnsense.system_settings_general:
    timezone: Europe/Zurich

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": "system_timezone_configure", "params": ["true"], "rc": 0, "stderr": "", "stderr_lines": [], "stdout": "Setting timezone: Europe/Zurich", "stdout_lines": ["Setting timezone: Europe/Zurich"]}, {"function": "system_trust_configure", "params": ["true"], "rc": 0, "stderr": "", "stderr_lines": [], "stdout": "Writing trust files...done.", "stdout_lines": ["Writing trust files...done."]}]

Authors

  • Reto Kupferschmid (@rekup)

Collection links

  • Issue Tracker
  • Homepage
  • Repository (Sources)
  • Report an issue
Previous Next

© Copyright Ansible contributors.