added initial state for rainloop
This commit is contained in:
parent
b58d7e0b99
commit
822b9138b1
3
states/rainloop/config.sls
Normal file
3
states/rainloop/config.sls
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
rainloop-config:
|
||||
|
11
states/rainloop/defaults.yaml
Normal file
11
states/rainloop/defaults.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
rainloop:
|
||||
enabled: true
|
||||
install_dir: /usr/local/apps
|
||||
release_dir: /usr/local/apps/releases
|
||||
#mirror: https://github.com/RainLoop/rainloop-webmail/releases/download/v1.14.0/rainloop-community-1.14.0.zip
|
||||
mirror: https://github.com/RainLoop/rainloop-webmail/releases/download
|
||||
version: 1.14.0
|
||||
user: www-data
|
||||
group: www-data
|
||||
config: {}
|
5
states/rainloop/init.sls
Normal file
5
states/rainloop/init.sls
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
include:
|
||||
#- php
|
||||
- .install
|
||||
#- .config
|
18
states/rainloop/install.sls
Normal file
18
states/rainloop/install.sls
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
{%- from "rainloop/map.jinja" import rainloop with context %}
|
||||
rainloop-archive-extract:
|
||||
archive.extracted:
|
||||
- name: {{ rainloop.release_dir }}/rainloop-community-{{ rainloop.version }}
|
||||
- source: {{ rainloop.mirror }}/v{{ rainloop.version }}/rainloop-community-{{ rainloop.version }}.zip
|
||||
- skip_verify: true
|
||||
- enforce_toplevel: false
|
||||
- user: {{ rainloop.user }}
|
||||
- group: {{ rainloop.group }}
|
||||
- if_missing: {{ rainloop.release_dir }}/rainloop-community-{{ rainloop.version }}
|
||||
|
||||
rainloop-archive-symlink:
|
||||
file.symlink:
|
||||
- name: {{ rainloop.install_dir }}/rainloop
|
||||
- target: {{ rainloop.release_dir }}/rainloop-community-{{ rainloop.version }}
|
||||
- require:
|
||||
- archive: rainloop-archive-extract
|
5
states/rainloop/map.jinja
Normal file
5
states/rainloop/map.jinja
Normal file
@ -0,0 +1,5 @@
|
||||
{%- import_yaml "rainloop/defaults.yaml" as default_settings -%}
|
||||
|
||||
{%- set defaults = salt['grains.filter_by'](default_settings, default='rainloop') -%}
|
||||
|
||||
{%- set rainloop = salt['pillar.get']('rainloop', default=defaults, merge=True) -%}
|
Loading…
Reference in New Issue
Block a user