Remove test VG if exists

This commit is contained in:
Klention Mali 2025-07-14 20:18:36 +02:00
commit eb37c64189
No known key found for this signature in database
GPG key ID: 777C0B2D8F048DAB

View file

@ -45,6 +45,11 @@
ansible.builtin.command: pvs --noheadings -o pv_size --units M {{ loop_device_02.stdout }} ansible.builtin.command: pvs --noheadings -o pv_size --units M {{ loop_device_02.stdout }}
register: pv_size_output_02 register: pv_size_output_02
- name: Making sure volume group vg_tmp_test does not exist
community.general.lvg:
vg: vg_tmp_test
state: absent
- name: Creating volume group on top of first device {{ loop_device_01.stdout }} - name: Creating volume group on top of first device {{ loop_device_01.stdout }}
community.general.lvg: community.general.lvg:
vg: vg_tmp_test vg: vg_tmp_test
@ -66,9 +71,6 @@
state: present state: present
register: fs_creation_result register: fs_creation_result
#- name: Mounting LV lv_tmp_test to {{ remote_tmp_dir }}/tmp_mount
# ansible.builtin.shell: mount -o rw,noauto /dev/vg_tmp_test/lv_tmp_test {{ remote_tmp_dir }}/tmp_mount
- name: Mounting LV lv_tmp_test - name: Mounting LV lv_tmp_test
ansible.posix.mount: ansible.posix.mount:
fstab: '{{ remote_tmp_dir }}/fstab' fstab: '{{ remote_tmp_dir }}/fstab'