arensb.truenas.jail module – Manage a jail

Note

This module is part of the arensb.truenas collection (version 1.11.4).

To install it, use: ansible-galaxy collection install arensb.truenas.

To use it in a playbook, specify: arensb.truenas.jail.

New in arensb.truenas 1.1.0

Synopsis

  • Create, destroy, or configure a jail.

  • To manage the jail system itself, see the jails module.

Parameters

Parameter

Comments

name

string / required

Name of the jail. This must be a unique ID.

packages

aliases: pkglist

list / elements=string

List of packages to install when the jail is created.

Each entry can be either a port (e.g., lang/python39), a package (e.g., python39), or a specific version of a package (e.g., python39-3.9.16_2).

release

string

Name of FreeBSD release to base this jail on.

Required when creating a jail.

state

string

Whether the jail should exist or not.

If ‘absent’, the jail will be removed.

If ‘present’, the jail will be created if it doesn’t exist, but will not be started.

‘running’ and ‘stopped’ allow you to make sure the jail is up or down.

‘restarted’ will restart the jail, similar to rebooting it.

Choices:

  • "absent"

  • "present" ← (default)

  • "restarted"

  • "running"

  • "stopped"

Examples


Return Values

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

Key

Description

jail

dictionary

An object containing a description of a newly-created jail. The format is the same as that returned by the jail.query middleware call.

Returned: success