Skip to content

Commit

Permalink
Merge pull request #23 from eagleusb/master
Browse files Browse the repository at this point in the history
Ability to specify mountpoint directory mode
  • Loading branch information
MiLk authored Aug 16, 2021
2 parents 783e9b3 + 41acc36 commit b2362d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ disk_additional_disks:
mount: /data
user: www-data
group: www-data
mode: 0755
disable_periodic_fsck: false
- disk: /dev/nvme0n1
part: /dev/nvme0n1p1
Expand All @@ -41,6 +42,7 @@ disk_additional_disks:
* `mount` is the directory where the new disk should be mounted.
* `user` sets owner of the mount directory (default: `root`).
* `group` sets group of the mount directory (default: `root`).
* `mode` sets the mountpoint directory permissions (default: `0755`).
* `disable_periodic_fsck` deactivates the periodic ext3/4 filesystem check for the new disk.

You can add:
Expand Down
3 changes: 2 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
opts: '{{ item.0.mount_options|d(omit) }}'
passno: '0'
src: 'UUID={{ item.1.stdout }}'
state: '{{ item.0.mount_state|d("mounted") }}'
state: '{{ item.0.mount_state | default("mounted") }}'
with_together:
- '{{ disk_additional_disks }}'
- '{{ disk_blkid.results }}'
Expand All @@ -113,6 +113,7 @@
path: '{{ item.mount }}'
owner: '{{ item.user | default("root") }}'
group: '{{ item.group | default("root") }}'
mode: '{{ item.mode | default("0755") }}'
state: directory
with_items: '{{ disk_additional_disks }}'
tags: ['disk']

0 comments on commit b2362d5

Please sign in to comment.