community.general.lvg_rename module – Renames LVM volume groups

Note

This module is part of the community.general collection (version 6.6.9).

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.lvg_rename.

New in community.general 7.1.0

Synopsis

  • This module renames volume groups using the vgchange command.

Parameters

Parameter

Comments

vg

string / required

The name or UUID of the source VG.

See vgrename(8) for valid values.

vg_new

string / required

The new name of the VG.

See lvm(8) for valid names.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: full

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

  • This module does not modify VG renaming-related configurations like fstab entries or boot parameters.

See Also

See also

community.general.lvg

Configure LVM volume groups.

Examples

- name: Rename a VG by name
  community.general.lvg_rename:
    vg: vg_orig_name
    vg_new: vg_new_name

- name: Rename a VG by UUID
  community.general.lvg_rename:
    vg_uuid: SNgd0Q-rPYa-dPB8-U1g6-4WZI-qHID-N7y9Vj
    vg_new: vg_new_name

Authors

  • Laszlo Szomor (@lszomor)