diff --git a/tasks/storage.yml b/tasks/storage.yml index 58359ee..babea82 100644 --- a/tasks/storage.yml +++ b/tasks/storage.yml @@ -1,11 +1,11 @@ --- - block: - - name: Create volume group 'mongodb_lvm_vg' + - name: Create volume group '{{ mongodb_lvm_vg }}' lvg: vg: "{{ mongodb_lvm_vg }}" pvs: "{{ mongodb_lvm_pvs|join(',') }}" - - name: Create logical volume 'mongodb_lvm_lv' + - name: Create logical volume '{{ mongodb_lvm_lv }}' lvol: vg: "{{ mongodb_lvm_vg }}" lv: "{{ mongodb_lvm_lv }}" @@ -16,17 +16,10 @@ fstype: "{{ mongodb_lvm_fstype }}" dev: "/dev/mapper/{{ mongodb_lvm_vg }}-{{ mongodb_lvm_lv }}" - - name: Mount volume to 'mongodb_storage_dbpath' + - name: Mount volume to '{{ mongodb_storage_dbpath }}' mount: path: "{{ mongodb_storage_dbpath }}" src: "/dev/mapper/{{ mongodb_lvm_vg }}-{{ mongodb_lvm_lv }}" fstype: "{{ mongodb_lvm_fstype }}" state: mounted - - - name: Change permissions for mountpoint - file: - path: "{{ mongodb_storage_dbpath }}" - owner: "{{ mongodb_user }}" - group: "{{ mongodb_group }}" - mode: 0750 become: True