community.general.beadm module – Manage ZFS boot environments on FreeBSD/Solaris/illumos systems
Note
This module is part of the community.general collection (version 10.1.0).
You might already have this collection installed if you are using the ansible
package.
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 community.general
.
To use it in a playbook, specify: community.general.beadm
.
Synopsis
Create, delete or activate ZFS boot environments.
Mount and unmount ZFS boot environments.
Parameters
Parameter |
Comments |
---|---|
Associate a description with a new boot environment. This option is available only on Solarish platforms. |
|
Specifies if the unmount should be forced. Choices:
|
|
Path where to mount the ZFS boot environment. |
|
ZFS boot environment name. |
|
Create the datasets for new BE with specific ZFS properties. Multiple options can be specified. This option is available only on Solarish platforms. |
|
If specified, the new boot environment will be cloned from the given snapshot or inactive boot environment. |
|
Create or delete ZFS boot environment. Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create ZFS boot environment
community.general.beadm:
name: upgrade-be
state: present
- name: Create ZFS boot environment from existing inactive boot environment
community.general.beadm:
name: upgrade-be
snapshot: be@old
state: present
- name: Create ZFS boot environment with compression enabled and description "upgrade"
community.general.beadm:
name: upgrade-be
options: "compression=on"
description: upgrade
state: present
- name: Delete ZFS boot environment
community.general.beadm:
name: old-be
state: absent
- name: Mount ZFS boot environment on /tmp/be
community.general.beadm:
name: BE
mountpoint: /tmp/be
state: mounted
- name: Unmount ZFS boot environment
community.general.beadm:
name: BE
state: unmounted
- name: Activate ZFS boot environment
community.general.beadm:
name: upgrade-be
state: activated
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
BE description Returned: always Sample: |
|
If forced action is wanted Returned: always Sample: |
|
BE mountpoint Returned: always Sample: |
|
BE name Returned: always Sample: |
|
BE additional options Returned: always Sample: |
|
ZFS snapshot to create BE from Returned: always Sample: |
|
state of the target Returned: always Sample: |