Wiping LVM metadata from PVs before creating VG

This commit is contained in:
Klention Mali 2025-07-15 22:33:39 +02:00
commit 2da7133717
No known key found for this signature in database
GPG key ID: 777C0B2D8F048DAB
2 changed files with 10 additions and 1 deletions

View file

@ -27,6 +27,15 @@
- name: Associating loop device with file
ansible.builtin.command: 'losetup {{ loop_device_02.stdout }} {{ remote_tmp_dir }}/test_lvm_pv_02.img'
- name: Wiping existing LVM metadata
community.general.lvm_pv:
device: "{{ item }}"
force: true
state: absent
loop:
- "{{ loop_device_01.stdout }}"
- "{{ loop_device_02.stdout }}"
- name: Creating physical volume for the first loop device
community.general.lvm_pv:
device: "{{ loop_device_01.stdout }}"

View file

@ -5,7 +5,7 @@
####################################################################
# Copyright (c) Contributors to the Ansible project
# Based on the integraton test for the lvm_pv module
# Based on the integration test for the lvm_pv module
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later