diff --git a/pillar/devserver/datacubes.sls b/pillar/devserver/datacubes.sls new file mode 100644 index 0000000..7c91347 --- /dev/null +++ b/pillar/devserver/datacubes.sls @@ -0,0 +1,16 @@ +# ------------------------------------------------------------- +# Salt configuration for Nasqueron servers +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Project: Nasqueron +# License: Trivial work, not eligible to copyright +# ------------------------------------------------------------- + +# ------------------------------------------------------------- +# Datacubes +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +datacubes: + + bak: &default {} + git: *default + t: *default diff --git a/pillar/top.sls b/pillar/top.sls index 7772adf..3560484 100644 --- a/pillar/top.sls +++ b/pillar/top.sls @@ -1,69 +1,70 @@ # ------------------------------------------------------------- # Salt configuration for Nasqueron servers # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Project: Nasqueron # Created: 2016-04-10 # License: Trivial work, not eligible to copyright # ------------------------------------------------------------- base: '*': - core.users - core.groups - core.network - certificates.certificates - nodes.nodes - nodes.forests - hotfixes.roles - services.monitoring-reporting - services.table - webserver.sites cloudhugger: - opensearch.software - opensearch.clusters complector: - credentials.vault # To provision services - saas.rabbitmq docker-002: - notifications.config - paas.docker - saas.jenkins - saas.phpbb db-A-001: - dbserver.cluster-A db-B-001: - dbserver.cluster-B dwellers: - paas.docker - saas.jenkins eglide: - shellserver.quassel ysul: - devserver.repos - saas.mediawiki - viperserv.bots - viperserv.fantoir - webserver.labs - webserver.wwwroot51 web-001: - saas.mediawiki - saas.wordpress - webserver.credentials windriver: + - devserver.datacubes - devserver.ports - devserver.repos - webserver.labs - webserver.credentials - webserver.wwwroot51 diff --git a/roles/devserver/datacube/init.sls b/roles/devserver/datacube/init.sls index 86a6450..2937aab 100644 --- a/roles/devserver/datacube/init.sls +++ b/roles/devserver/datacube/init.sls @@ -1,40 +1,38 @@ # ------------------------------------------------------------- # Salt — Provision dev software # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Project: Nasqueron # License: Trivial work, not eligible to copyright # ------------------------------------------------------------- # ------------------------------------------------------------- # Directory # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /datacube: file.directory: - mode: 711 # ------------------------------------------------------------- # ZFS # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if salt['node.has']('zfs:pool') %} {% set tank = salt['node.get']("zfs:pool") %} -{% set subdirs = ["bak", "git", "t"] %} {{ tank }}/datacube: zfs.filesystem_present: - properties: mountpoint: /datacube compression: zstd -{% for subdir in subdirs %} +{% for subdir, args in pillar.get("datacubes", {}).items() %} {{ tank }}/datacube/{{ subdir }}: zfs.filesystem_present: - properties: mountpoint: /datacube/{{ subdir }} compression: zstd {% endfor %} {% endif %}