mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2026-09-07 07:58:25 +03:00
Merge pull request #17 from stackhpc/no-filesystem
Support not formatting volumes.
This commit is contained in:
@@ -46,7 +46,9 @@
|
|||||||
(item[1] is defined and
|
(item[1] is defined and
|
||||||
item[1] != 'None') and
|
item[1] != 'None') and
|
||||||
(item[1]['create'] is defined and
|
(item[1]['create'] is defined and
|
||||||
item[1]['create']))
|
item[1]['create']) and
|
||||||
|
(item[1]['filesystem'] is defined and
|
||||||
|
item[1]['filesystem'] != 'None'))
|
||||||
|
|
||||||
- name: manage_lvm | mounting new filesystem(s)
|
- name: manage_lvm | mounting new filesystem(s)
|
||||||
mount:
|
mount:
|
||||||
@@ -77,6 +79,8 @@
|
|||||||
- lvnames
|
- lvnames
|
||||||
when: >
|
when: >
|
||||||
lvm['changed'] and
|
lvm['changed'] and
|
||||||
|
item[1]['filesystem'] is defined and
|
||||||
|
item[1]['filesystem'] != "None" and
|
||||||
item[1]['filesystem'] != "swap" and
|
item[1]['filesystem'] != "swap" and
|
||||||
item[1]['filesystem'] != "xfs" and
|
item[1]['filesystem'] != "xfs" and
|
||||||
item[1]['filesystem'] != "btrfs"
|
item[1]['filesystem'] != "btrfs"
|
||||||
@@ -89,6 +93,7 @@
|
|||||||
- lvnames
|
- lvnames
|
||||||
when: >
|
when: >
|
||||||
lvm['changed'] and
|
lvm['changed'] and
|
||||||
|
item[1]['filesystem'] is defined and
|
||||||
item[1]['filesystem'] == "xfs"
|
item[1]['filesystem'] == "xfs"
|
||||||
|
|
||||||
- name: manage_lvm | resizing swap
|
- name: manage_lvm | resizing swap
|
||||||
@@ -99,6 +104,7 @@
|
|||||||
- lvnames
|
- lvnames
|
||||||
when: >
|
when: >
|
||||||
lvm['changed'] and
|
lvm['changed'] and
|
||||||
|
item[1]['filesystem'] is defined and
|
||||||
item[1]['filesystem'] == "swap"
|
item[1]['filesystem'] == "swap"
|
||||||
|
|
||||||
- name: manage_lvm | resizing btrfs
|
- name: manage_lvm | resizing btrfs
|
||||||
@@ -109,13 +115,14 @@
|
|||||||
- lvnames
|
- lvnames
|
||||||
when: >
|
when: >
|
||||||
lvm['changed'] and
|
lvm['changed'] and
|
||||||
|
item[1]['filesystem'] is defined and
|
||||||
item[1]['filesystem'] == "btrfs"
|
item[1]['filesystem'] == "btrfs"
|
||||||
|
|
||||||
- name: manage_lvm | unmounting filesystem(s)
|
- name: manage_lvm | unmounting filesystem(s)
|
||||||
mount:
|
mount:
|
||||||
name: "{{ item[1]['mntp'] }}"
|
name: "{{ item[1]['mntp'] }}"
|
||||||
src: "/dev/{{ item[0]['vgname'] }}/{{ item[1]['lvname'] }}"
|
src: "/dev/{{ item[0]['vgname'] }}/{{ item[1]['lvname'] }}"
|
||||||
fstype: "{{ item[1]['filesystem'] }}"
|
fstype: "{{ item[1]['filesystem'] | default(omit) }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
become: true
|
become: true
|
||||||
with_subelements:
|
with_subelements:
|
||||||
|
|||||||
Reference in New Issue
Block a user