Page MenuHomeDevCentral

D3628.diff
No OneTemporary

D3628.diff

diff --git a/roles/mailserver/dovecot/init.sls b/roles/mailserver/dovecot/config.sls
copy from roles/mailserver/dovecot/init.sls
copy to roles/mailserver/dovecot/config.sls
--- a/roles/mailserver/dovecot/init.sls
+++ b/roles/mailserver/dovecot/config.sls
@@ -1,5 +1,5 @@
# -------------------------------------------------------------
-# Salt — Provision dovecot Config
+# Salt — Provision Dovecot
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
@@ -10,8 +10,6 @@
{% set network = salt['node.resolve_network']() %}
-dovecot:
- pkg.installed
{{ dirs.etc }}/dovecot/conf.d:
file.directory:
@@ -20,7 +18,7 @@
- group: wheel
- makedirs: True
-{{ dirs.etc }}/dovecot/dovecot.conf:
+{ dirs.etc }}/dovecot/dovecot.conf:
file.managed:
- source: salt://roles/mailserver/dovecot/files/dovecot.conf
- template: jinja
@@ -48,8 +46,3 @@
ip_internal: {{ network["private_ipv4_address"] }}
mailbox:
dir: /var/mail/_virtual
-
-dovecot_running:
- service.running:
- - name: dovecot
- - enable: True
diff --git a/roles/mailserver/dovecot/init.sls b/roles/mailserver/dovecot/init.sls
--- a/roles/mailserver/dovecot/init.sls
+++ b/roles/mailserver/dovecot/init.sls
@@ -1,55 +1,11 @@
# -------------------------------------------------------------
-# Salt — Provision dovecot Config
+# Salt — Provision Dovecot
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import dirs with context %}
-{% set db = pillar["dovecot_config"]["db"] %}
-
-{% set network = salt['node.resolve_network']() %}
-
-dovecot:
- pkg.installed
-
-{{ dirs.etc }}/dovecot/conf.d:
- file.directory:
- - mode: 755
- - user: root
- - group: wheel
- - makedirs: True
-
-{{ dirs.etc }}/dovecot/dovecot.conf:
- file.managed:
- - source: salt://roles/mailserver/dovecot/files/dovecot.conf
- - template: jinja
-
-{{ dirs.etc }}/dovecot/dovecot-sql.conf.ext:
- file.managed:
- - source: salt://roles/mailserver/dovecot/files/dovecot-sql.conf.ext
- - template: jinja
- - mode: 400
- - context:
- db:
- hostname: {{ pillar["nasqueron_services"][db["service"]] }}
- name: {{ db["database"] }}
- password: {{ salt["credentials.get_password"](db["credential"]) }}
- user: {{ salt["credentials.get_username"](db["credential"]) }}
-
-dovecot_file_config_conf_d:
- file.recurse:
- - source: salt://roles/mailserver/dovecot/files/conf.d
- - name: {{ dirs.etc }}/dovecot/conf.d
- - file_mode: 755
- - dir_mode: 755
- - template: jinja
- - context:
- ip_internal: {{ network["private_ipv4_address"] }}
- mailbox:
- dir: /var/mail/_virtual
-
-dovecot_running:
- service.running:
- - name: dovecot
- - enable: True
+include:
+ - .software
+ - .config
+ - .service
diff --git a/roles/mailserver/dovecot/service.sls b/roles/mailserver/dovecot/service.sls
new file mode 100644
--- /dev/null
+++ b/roles/mailserver/dovecot/service.sls
@@ -0,0 +1,11 @@
+# -------------------------------------------------------------
+# Salt — Provision Dovecot
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+dovecot_running:
+ service.running:
+ - name: dovecot
+ - enable: True
diff --git a/roles/mailserver/dovecot/software.sls b/roles/mailserver/dovecot/software.sls
new file mode 100644
--- /dev/null
+++ b/roles/mailserver/dovecot/software.sls
@@ -0,0 +1,9 @@
+# -------------------------------------------------------------
+# Salt — Provision Dovecot
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+dovecot:
+ pkg.installed

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 25, 21:44 (9 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2604870
Default Alt Text
D3628.diff (4 KB)

Event Timeline