summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/storage/lvm/volume/defaults/main.yml1
-rw-r--r--roles/storage/lvm/volume/tasks/main.yml1
-rw-r--r--roles/storage/zfs/volume/defaults/main.yml1
-rw-r--r--roles/storage/zfs/volume/tasks/main.yml2
4 files changed, 4 insertions, 1 deletions
diff --git a/roles/storage/lvm/volume/defaults/main.yml b/roles/storage/lvm/volume/defaults/main.yml
index c81fc239..815f6e1d 100644
--- a/roles/storage/lvm/volume/defaults/main.yml
+++ b/roles/storage/lvm/volume/defaults/main.yml
@@ -10,5 +10,6 @@
# mode: 0750
# owner: root
# group: users
+# mntopts: ro
lvm_volume: "{{ storage_volume }}"
diff --git a/roles/storage/lvm/volume/tasks/main.yml b/roles/storage/lvm/volume/tasks/main.yml
index 7e8c304f..eabf4022 100644
--- a/roles/storage/lvm/volume/tasks/main.yml
+++ b/roles/storage/lvm/volume/tasks/main.yml
@@ -16,6 +16,7 @@
src: "/dev/mapper/{{ lvm_volume.parent.vg | default(lvm_volume.vg) | replace('-', '--') }}-{{ lvm_volume.lv | replace('-', '--') }}"
path: "{{ lvm_volume.dest }}"
fstype: "{{ lvm_volume.fs }}"
+ opts: "{{ lvm_volume.mntopts | default(omit) }}"
state: mounted
- name: set volume owner/group and mode
diff --git a/roles/storage/zfs/volume/defaults/main.yml b/roles/storage/zfs/volume/defaults/main.yml
index 8b799655..495522f7 100644
--- a/roles/storage/zfs/volume/defaults/main.yml
+++ b/roles/storage/zfs/volume/defaults/main.yml
@@ -10,5 +10,6 @@
# mode: 0750
# owner: root
# group: users
+# mntopts: ro
zfs_volume: "{{ storage_volume }}"
diff --git a/roles/storage/zfs/volume/tasks/main.yml b/roles/storage/zfs/volume/tasks/main.yml
index 07a70dfc..6ad861e1 100644
--- a/roles/storage/zfs/volume/tasks/main.yml
+++ b/roles/storage/zfs/volume/tasks/main.yml
@@ -29,7 +29,7 @@
src: "{{ zfs_volume_info.ansible_facts.ansible_zfs_datasets[0].mountpoint }}"
path: "{{ zfs_volume.dest }}"
fstype: none
- opts: bind,x-systemd.automount,nofail
+ opts: "bind,x-systemd.automount,nofail{% if zfs_volume.mntopts is defined %},{{ zfs_volume.mntopts }}{% endif %}"
state: mounted
- name: update volume mountpoint