ansible.builtin.beadm (v2.4.4.0-1) — module

Manage ZFS boot environments on FreeBSD/Solaris/illumos systems.

| "added in version" 2.3 of ansible.builtin"

Authors: Adam Števko (@xen0l)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.4.4.0.post1

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
  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
  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"
  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
  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
  beadm:
    name: BE
    mountpoint: /tmp/be
    state: mounted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Unmount ZFS boot environment
  beadm:
    name: BE
    state: unmounted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Activate ZFS boot environment
  beadm:
    name: upgrade-be
    state: activated

Inputs

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

force:
    choices:
    - 'true'
    - 'false'
    default: false
    description:
    - Specifies if the unmount should be forced.
    required: false

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

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

snapshot:
    default: false
    description:
    - If specified, the new boot environment will be cloned from the given snapshot or
      inactive boot environment.
    required: false

mountpoint:
    default: false
    description:
    - Path where to mount the ZFS boot environment
    required: false

description:
    default: false
    description:
    - Associate a description with a new boot environment. This option is available only
      on Solarish platforms.
    required: false

Outputs

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