updated maildb state

This commit is contained in:
Paul 2022-12-26 10:12:29 +01:00
parent 28e7b98f65
commit aa79a59beb
2 changed files with 32 additions and 29 deletions

View File

@ -1,30 +1,3 @@
--- ---
{%- from "maildb/map.jinja" import maildb with context %} include:
maildb-pkg: - .install
pkg.latest:
- pkgs:
- python3
- python3-psycopg2
maildb-user-vmail:
user.present:
- name: vmail
- home: /home/vmail
maildb-apps-dir:
file.directory:
- name: {{ maildb.appdir }}
- user: vmail
- group: vmail
- mode: "0755"
- makedirs: true
maildb-script:
file.managed:
- name: {{ maildb.appdir }}/maildb.py
- source: salt://maildb/maildb.py
- user: vmail
- group: vmail
- mode: "0755"
- require:
- file: maildb-apps-dir

30
states/maildb/install.sls Normal file
View File

@ -0,0 +1,30 @@
---
{%- from "maildb/map.jinja" import maildb with context %}
maildb-pkg:
pkg.installed:
- pkgs:
- python3
- python3-psycopg2
maildb-user-vmail:
user.present:
- name: vmail
- home: /home/vmail
maildb-apps-dir:
file.directory:
- name: {{ maildb.appdir }}
- user: vmail
- group: vmail
- mode: "0755"
- makedirs: true
maildb-script:
file.managed:
- name: {{ maildb.appdir }}/maildb.py
- source: salt://maildb/maildb.py
- user: vmail
- group: vmail
- mode: "0755"
- require:
- file: maildb-apps-dir