diff options
Diffstat (limited to 'roles/storage/lvm/volume/tasks/main.yml')
-rw-r--r-- | roles/storage/lvm/volume/tasks/main.yml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/roles/storage/lvm/volume/tasks/main.yml b/roles/storage/lvm/volume/tasks/main.yml index eabf4022..006e7b89 100644 --- a/roles/storage/lvm/volume/tasks/main.yml +++ b/roles/storage/lvm/volume/tasks/main.yml @@ -1,19 +1,18 @@ --- -- name: create logical volume - lvol: - vg: "{{ lvm_volume.parent.vg | default(lvm_volume.vg) }}" - lv: "{{ lvm_volume.lv }}" - size: "{{ lvm_volume.size }}" - thinpool: "{{ lvm_volume.parent.lv | default(omit) }}" +- name: create lvm device + vars: + lvm_device: "{{ lvm_volume }}" + include_role: + name: storage/lvm/device - name: create filesystem filesystem: + dev: "{{ storage_device_path }}" fstype: "{{ lvm_volume.fs }}" - dev: "/dev/mapper/{{ lvm_volume.parent.vg | default(lvm_volume.vg) | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}" - name: mount filesytem mount: - src: "/dev/mapper/{{ lvm_volume.parent.vg | default(lvm_volume.vg) | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}" + src: "{{ storage_device_path }}" path: "{{ lvm_volume.dest }}" fstype: "{{ lvm_volume.fs }}" opts: "{{ lvm_volume.mntopts | default(omit) }}" |