homeserver/roles/mrlesmithjr.ansible-manage-lvm/tasks/create_lv.yml
mg 169abbedff LVM Konfiguration für docker mit neuer Rolle umgesetzt (#363)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#363
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-05-17 12:05:45 +02:00

31 lines
623 B
YAML

---
- name: create_lv | Display Volume Group
debug:
var: vg
verbosity: 2
- name: create_lv | creating new LVM logical volume(s)
lvol:
vg: "{{ vg.vgname }}"
lv: "{{ lv.lvname }}"
size: "{{ lv.size }}"
shrink: false
opts: "{{ lv.opts | default('') }}"
state: present
become: true
register: lvchanged
when:
- vg.create is defined
- vg.create|bool
- lv is defined
- lv != 'None'
- lv.create is defined
- lv.create|bool
- name: create_lv | debug changed attribute
debug:
var: lvchanged
- name: create_lv | configuring FS
include_tasks: create_fs.yml