community.general.beadm (8.5.0) — module

Manage ZFS boot environments on FreeBSD/Solaris/illumos systems

Authors: Adam Števko (@xen0l)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Create, delete or activate ZFS boot environments.

Mount and unmount ZFS boot environments.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create ZFS boot environment
  community.general.beadm:
    name: upgrade-be
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create ZFS boot environment from existing inactive boot environment
  community.general.beadm:
    name: upgrade-be
    snapshot: be@old
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create ZFS boot environment with compression enabled and description "upgrade"
  community.general.beadm:
    name: upgrade-be
    options: "compression=on"
    description: upgrade
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete ZFS boot environment
  community.general.beadm:
    name: old-be
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Mount ZFS boot environment on /tmp/be
  community.general.beadm:
    name: BE
    mountpoint: /tmp/be
    state: mounted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Unmount ZFS boot environment
  community.general.beadm:
    name: BE
    state: unmounted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Activate ZFS boot environment
  community.general.beadm:
    name: upgrade-be
    state: activated

Inputs

    
name:
    aliases:
    - be
    description:
    - ZFS boot environment name.
    required: true
    type: str

force:
    default: false
    description:
    - Specifies if the unmount should be forced.
    type: bool

state:
    choices:
    - absent
    - activated
    - mounted
    - present
    - unmounted
    default: present
    description:
    - Create or delete ZFS boot environment.
    type: str

options:
    description:
    - Create the datasets for new BE with specific ZFS properties.
    - Multiple options can be specified.
    - This option is available only on Solarish platforms.
    type: str

snapshot:
    description:
    - If specified, the new boot environment will be cloned from the given snapshot or
      inactive boot environment.
    type: str

mountpoint:
    description:
    - Path where to mount the ZFS boot environment.
    type: path

description:
    description:
    - Associate a description with a new boot environment. This option is available only
      on Solarish platforms.
    type: str

Outputs

description:
  description: BE description
  returned: always
  sample: Upgrade from 9.0 to 10.0
  type: str
force:
  description: If forced action is wanted
  returned: always
  sample: false
  type: bool
mountpoint:
  description: BE mountpoint
  returned: always
  sample: /mnt/be
  type: str
name:
  description: BE name
  returned: always
  sample: pre-upgrade
  type: str
options:
  description: BE additional options
  returned: always
  sample: compression=on
  type: str
snapshot:
  description: ZFS snapshot to create BE from
  returned: always
  sample: rpool/ROOT/oi-hipster@fresh
  type: str
state:
  description: state of the target
  returned: always
  sample: present
  type: str