Add volume role and support setting volume owner
Add volume role container: Use volume role, including support for user and group
This commit is contained in:
6
roles/volume/vars/main.yaml
Normal file
6
roles/volume/vars/main.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
volume_mount_options_incl_empty:
|
||||
- "{{ 'uid=' ~ volume_uid if volume_uid | length > 0 else '' }}"
|
||||
- "{{ 'gid=' ~ volume_gid if volume_gid | length > 0 else '' }}"
|
||||
volume_mount_options: "{{ volume_mount_options_incl_empty | select('!=', '') | list }}"
|
||||
volume_options: "{{ ['o=' ~ volume_mount_options | join(',')] if volume_mount_options | length > 0 else [] }}"
|
||||
Reference in New Issue
Block a user