diff --git a/states/rainloop/config.sls b/states/rainloop/config.sls index 73b314f..41f5e0b 100644 --- a/states/rainloop/config.sls +++ b/states/rainloop/config.sls @@ -1 +1,19 @@ ---- \ No newline at end of file +--- +{%- from "rainloop/map.jinja" import rainloop with context %} +rainloop-data-dir: + file.directory: + - name: {{ rainloop.data_dir }} + - user: {{ rainloop.user }} + - group: {{ rainloop.group }} + +rainloop-config: + file.managed: + - name: {{ rainloop.install_dir }}/rainloop/include.php + - source: salt://rainloop/templates/include.php.j2 + - user: {{ rainloop.user }} + - group: {{ rainloop.group }} + - template: jinja + - context: + config_includes: + - '$sCustomDataPath = "{{ rainloop.data_dir }}";' + - '$sCustomConfiguration = "";' \ No newline at end of file diff --git a/states/rainloop/defaults.yaml b/states/rainloop/defaults.yaml index 3dc54d4..5dc3fad 100644 --- a/states/rainloop/defaults.yaml +++ b/states/rainloop/defaults.yaml @@ -5,6 +5,7 @@ rainloop: release_dir: /usr/local/apps/releases mirror: https://github.com/RainLoop/rainloop-webmail/releases/download version: 1.14.0 + data_dir: /var/lib/rainloop user: www-data group: www-data config: {} diff --git a/states/rainloop/init.sls b/states/rainloop/init.sls index 312f2b1..a1253de 100644 --- a/states/rainloop/init.sls +++ b/states/rainloop/init.sls @@ -1,5 +1,5 @@ --- include: - #- php + - php - .install - #- .config + - .config diff --git a/states/rainloop/templates/include.php.j2 b/states/rainloop/templates/include.php.j2 new file mode 100644 index 0000000..09df649 --- /dev/null +++ b/states/rainloop/templates/include.php.j2 @@ -0,0 +1,5 @@ +