From 47d87dbce9c541ad4a8a5801c0d6cf7bff90f5f1 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 27 Nov 2021 13:25:44 +0100 Subject: [PATCH] updated rainloop state --- states/rainloop/config.sls | 20 +++++++++++++++++++- states/rainloop/defaults.yaml | 1 + states/rainloop/init.sls | 4 ++-- states/rainloop/templates/include.php.j2 | 5 +++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 states/rainloop/templates/include.php.j2 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 @@ +