Skip to content

Commit b2362d5

Browse files
authored
Merge pull request #23 from eagleusb/master
Ability to specify mountpoint directory mode
2 parents 783e9b3 + 41acc36 commit b2362d5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ disk_additional_disks:
2222
mount: /data
2323
user: www-data
2424
group: www-data
25+
mode: 0755
2526
disable_periodic_fsck: false
2627
- disk: /dev/nvme0n1
2728
part: /dev/nvme0n1p1
@@ -41,6 +42,7 @@ disk_additional_disks:
4142
* `mount` is the directory where the new disk should be mounted.
4243
* `user` sets owner of the mount directory (default: `root`).
4344
* `group` sets group of the mount directory (default: `root`).
45+
* `mode` sets the mountpoint directory permissions (default: `0755`).
4446
* `disable_periodic_fsck` deactivates the periodic ext3/4 filesystem check for the new disk.
4547

4648
You can add:

tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
opts: '{{ item.0.mount_options|d(omit) }}'
103103
passno: '0'
104104
src: 'UUID={{ item.1.stdout }}'
105-
state: '{{ item.0.mount_state|d("mounted") }}'
105+
state: '{{ item.0.mount_state | default("mounted") }}'
106106
with_together:
107107
- '{{ disk_additional_disks }}'
108108
- '{{ disk_blkid.results }}'
@@ -113,6 +113,7 @@
113113
path: '{{ item.mount }}'
114114
owner: '{{ item.user | default("root") }}'
115115
group: '{{ item.group | default("root") }}'
116+
mode: '{{ item.mode | default("0755") }}'
116117
state: directory
117118
with_items: '{{ disk_additional_disks }}'
118119
tags: ['disk']

0 commit comments

Comments
 (0)