38 lines
814 B
YAML
38 lines
814 B
YAML
|
|
||
|
- name: Contexte logical volume
|
||
|
debug:
|
||
|
var: _lv
|
||
|
|
||
|
- name: Definit logical volume
|
||
|
lvol:
|
||
|
vg: "{{ _lv.vg }}"
|
||
|
lv: "{{ _lv.name }}"
|
||
|
size: "{{ _lv.size }}"
|
||
|
resizefs: true
|
||
|
delegate_to: "{{ _vm_ip }}"
|
||
|
|
||
|
- name: Verifie que logical volume est formaté
|
||
|
filesystem:
|
||
|
fstype: xfs
|
||
|
dev: "/dev/{{ _lv.vg }}/{{ _lv.name }}"
|
||
|
delegate_to: "{{ _vm_ip }}"
|
||
|
when: _lv.mountpoint is defined
|
||
|
|
||
|
- name: Verifie que mountpoint existe
|
||
|
file:
|
||
|
path: "{{ _lv.mountpoint }}"
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
when: _lv.mountpoint is defined
|
||
|
delegate_to: "{{ _vm_ip }}"
|
||
|
|
||
|
- name: Monte logical volume
|
||
|
mount:
|
||
|
path: "{{ _lv.mountpoint }}"
|
||
|
src: "/dev/{{ _lv.vg }}/{{ _lv.name }}"
|
||
|
fstype: xfs
|
||
|
state: mounted
|
||
|
when: _lv.mountpoint is defined
|
||
|
delegate_to: "{{ _vm_ip }}"
|
||
|
|