Documentation

    PLEASE NOTE: This document applies to latest version and not to the latest stable release v2.19

    Documentation for other releases can be found by using the version selector in the top right of any doc page.

    lvg

    Manage LVM volume groups.

    Attributes

    check_mode:
      support: full
    

    Parameters

    Parameter Required Type Values Description
    force   boolean   Force removal of volume group. [default: false]
    pvs   string   List of comma-separated physical volumes. Required when state is present.
    state   string present
    absent
    Whether the volume group should exist or not. [default: "present"]
    vg true string   Name of the volume group.

    Example

    - name: Create volume group
      lvg:
        vg: data_vg
        pvs: /dev/sdb1,/dev/sdc1
    
    - name: Create volume group with single PV
      lvg:
        vg: system_vg
        pvs: /dev/sda2
    
    - name: Remove volume group
      lvg:
        vg: old_vg
        state: absent
    
    - name: Force remove volume group
      lvg:
        vg: old_vg
        state: absent
        force: true