Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3906651
D3312.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3312.diff
View Options
diff --git a/pillar/devserver/datacubes.sls b/pillar/devserver/datacubes.sls
--- a/pillar/devserver/datacubes.sls
+++ b/pillar/devserver/datacubes.sls
@@ -32,6 +32,11 @@
zfs_user: xcombelle
zfs_auto_snapshot: True
+ nextcloud:
+ user_from_pillar: "nextcloud:user"
+ zfs_user_from_pillar: "nextcloud:user"
+ zfs_auto_snapshot: True
+
# -------------------------------------------------------------
# Other directories needed by development work
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/roles/devserver/datacube/init.sls b/roles/devserver/datacube/init.sls
--- a/roles/devserver/datacube/init.sls
+++ b/roles/devserver/datacube/init.sls
@@ -36,6 +36,11 @@
file.directory:
- mode: 711
- user: {{ args["user"] }}
+{% elif "user_from_pillar" in args %}
+/datacube/{{ subdir }}:
+ file.directory:
+ - mode: 711
+ - user: {{ salt["pillar.get"](args["user_from_pillar"]) }}
{% endif %}
{{ datacube_dataset }}:
@@ -48,15 +53,25 @@
{% endif %}
{% if "zfs_user" in args %}
+ {% set zfs_user = args["zfs_user"] %}
+ {% set with_zfs_user = True %}
+{% elif "zfs_user_from_pillar" in args %}
+ {% set zfs_user = salt["pillar.get"](args["zfs_user_from_pillar"]) %}
+ {% set with_zfs_user = True %}
+{% else %}
+ {% set with_zfs_user = False %}
+{% endif %}
+
+{% if with_zfs_user %}
zfs_permissions_datacube_{{ subdir }}:
cmd.run:
- - name: zfs allow -lu {{ args["zfs_user"] }} @local {{ datacube_dataset }}
+ - name: zfs allow -lu {{ zfs_user }} @local {{ datacube_dataset }}
- onchanges:
- zfs: {{ datacube_dataset }}
zfs_permissions_datacube_descendent_{{ subdir }}:
cmd.run:
- - name: zfs allow -du {{ args["zfs_user"] }} @descendent {{ datacube_dataset }}
+ - name: zfs allow -du {{ zfs_user }} @descendent {{ datacube_dataset }}
- onchanges:
- zfs: {{ datacube_dataset }}
{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 05:28 (2 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2306067
Default Alt Text
D3312.diff (1 KB)
Attached To
Mode
D3312: Create datacube directory for NextCloud
Attached
Detach File
Event Timeline
Log In to Comment