53 lines
1.0 KiB
Plaintext
53 lines
1.0 KiB
Plaintext
---
|
|
{%- from "maildb/map.jinja" import maildb with context %}
|
|
maildb-pkg:
|
|
pkg.latest:
|
|
- pkgs:
|
|
- python
|
|
- python-mysqldb
|
|
- python3
|
|
- python3-mysqldb
|
|
|
|
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-data-dir:
|
|
file.directory:
|
|
- name: {{ maildb.datadir }}
|
|
- 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
|
|
- file: maildb-data-dir
|
|
|
|
maildb-config:
|
|
file.managed:
|
|
- name: {{ maildb.appdir }}/maildb.ini
|
|
- source: salt://maildb/maildb.ini.j2
|
|
- user: vmail
|
|
- group: vmail
|
|
- mode: 0755
|
|
- template: jinja
|
|
- require:
|
|
- file: maildb-apps-dir
|
|
- file: maildb-data-dir |