mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 04:34:24 -07:00
Wiping LVM metadata from PVs before creating VG
This commit is contained in:
parent
f72e945f9e
commit
2da7133717
2 changed files with 10 additions and 1 deletions
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue