reorganize postfix/email role; drop meta/main.yml dependencies as they interact badly...
authorRalf Jung <post@ralfj.de>
Sun, 20 May 2018 08:57:35 +0000 (10:57 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 20 May 2018 08:57:35 +0000 (10:57 +0200)
30 files changed:
email.yml [deleted file]
roles/apache/meta/main.yml [deleted file]
roles/email/files/check-for-local-mail [moved from roles/postfix/files/check-for-local-mail with 100% similarity]
roles/email/files/mailman-check [moved from roles/postfix/files/mailman-check with 100% similarity]
roles/email/files/newmail/newmail [moved from roles/postfix/files/newmail/newmail with 100% similarity]
roles/email/files/newmail/templates.py [moved from roles/postfix/files/newmail/templates.py with 100% similarity]
roles/email/files/unbound/dhclient.conf [moved from roles/postfix/files/unbound/dhclient.conf with 100% similarity]
roles/email/files/unbound/listen.conf [moved from roles/postfix/files/unbound/listen.conf with 100% similarity]
roles/email/files/unbound/unbound.service.override [moved from roles/postfix/files/unbound/unbound.service.override with 100% similarity]
roles/email/handlers/main.yml [moved from roles/postfix/handlers/main.yml with 100% similarity]
roles/email/tasks/main.yml [moved from roles/postfix/tasks/main.yml with 60% similarity]
roles/email/tasks/opendkim.yml [moved from roles/postfix/tasks/opendkim.yml with 100% similarity]
roles/email/tasks/postfix.yml [moved from roles/postfix/tasks/postfix.yml with 100% similarity]
roles/email/tasks/unbound.yml [moved from roles/postfix/tasks/unbound.yml with 100% similarity]
roles/email/templates/KeyTable [moved from roles/postfix/templates/KeyTable with 100% similarity]
roles/email/templates/SigningTable [moved from roles/postfix/templates/SigningTable with 100% similarity]
roles/email/templates/main.cf [moved from roles/postfix/templates/main.cf with 100% similarity]
roles/email/templates/master.cf [moved from roles/postfix/templates/master.cf with 100% similarity]
roles/email/templates/mysql_vmail_aliases.cf [moved from roles/postfix/templates/mysql_vmail_aliases.cf with 100% similarity]
roles/email/templates/mysql_vmail_senders.cf [moved from roles/postfix/templates/mysql_vmail_senders.cf with 100% similarity]
roles/email/templates/mysql_vmail_users.cf [moved from roles/postfix/templates/mysql_vmail_users.cf with 100% similarity]
roles/email/templates/opendkim.conf [moved from roles/postfix/templates/opendkim.conf with 100% similarity]
roles/email/templates/opendkim.env [moved from roles/postfix/templates/opendkim.env with 100% similarity]
roles/email/vmail.sql [moved from roles/postfix/vmail.sql with 100% similarity]
roles/journalwatch/meta/main.yml [deleted file]
roles/journalwatch/tasks/journalwatch.yml [deleted file]
roles/journalwatch/tasks/main.yml
roles/postfix/meta/main.yml [deleted file]
roles/prosody/meta/main.yml [deleted file]
site.yml

diff --git a/email.yml b/email.yml
deleted file mode 100644 (file)
index 42fb0a5..0000000
--- a/email.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-- hosts: email
-  roles:
-  - postfix
-  - journalwatch
-  tasks:
-  # some basic security stuff that relies on working email
-  - name: install apticron
-    apt: name=apticron state=latest
diff --git a/roles/apache/meta/main.yml b/roles/apache/meta/main.yml
deleted file mode 100644 (file)
index 3de0130..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-- { role: letsencrypt }
similarity index 60%
rename from roles/postfix/tasks/main.yml
rename to roles/email/tasks/main.yml
index af796d3b0e541ef18efb3dd145c9bb4fe71b26b7..176ac206d890ad400513e4299170f0f1eefa5e0e 100644 (file)
@@ -6,3 +6,6 @@
   when: postfix.opendkim is defined
 - import_tasks: postfix.yml
   tags: postfix
   when: postfix.opendkim is defined
 - import_tasks: postfix.yml
   tags: postfix
+# some basic security stuff that relies on working email
+- name: install apticron
+  apt: name=apticron state=latest
diff --git a/roles/journalwatch/meta/main.yml b/roles/journalwatch/meta/main.yml
deleted file mode 100644 (file)
index c2c4e37..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-- { role: postfix }
diff --git a/roles/journalwatch/tasks/journalwatch.yml b/roles/journalwatch/tasks/journalwatch.yml
deleted file mode 100644 (file)
index 74e8f68..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-- name: install journalwatch dependencies
-  apt: name=python3-systemd state=latest
-- name: install journalwatch
-  git:
-    dest: /root/journalwatch
-    repo: 'https://github.com/The-Compiler/journalwatch.git'
-    version: b62f223bc36eabc193cfcf0d309d284da4f66463
-- name: create journalwatch config dir
-  file: path=/root/.config/journalwatch state=directory
-- name: install journalwatch config files
-  copy:
-    src: files/{{item}}
-    dest: /root/.config/journalwatch/{{item}}
-  loop:
-  - config
-  - patterns
-- name: delete old journalwatch crontab entry
-  file: path=/etc/cron.d/journalwatch state=absent
-- name: create journalwatch crontab entry
-  cron:
-    name: "journalwatch"
-    minute: "*/10"
-    job: "/root/journalwatch/journalwatch.py mail"
index 5621a8f37da936f0412637ff61586ff1886e2efe..74e8f6836b90a2bfe081cbb8f43f361323edd8a1 100644 (file)
@@ -1,2 +1,23 @@
-- import_tasks: journalwatch.yml
-  tags: journalwatch
+- name: install journalwatch dependencies
+  apt: name=python3-systemd state=latest
+- name: install journalwatch
+  git:
+    dest: /root/journalwatch
+    repo: 'https://github.com/The-Compiler/journalwatch.git'
+    version: b62f223bc36eabc193cfcf0d309d284da4f66463
+- name: create journalwatch config dir
+  file: path=/root/.config/journalwatch state=directory
+- name: install journalwatch config files
+  copy:
+    src: files/{{item}}
+    dest: /root/.config/journalwatch/{{item}}
+  loop:
+  - config
+  - patterns
+- name: delete old journalwatch crontab entry
+  file: path=/etc/cron.d/journalwatch state=absent
+- name: create journalwatch crontab entry
+  cron:
+    name: "journalwatch"
+    minute: "*/10"
+    job: "/root/journalwatch/journalwatch.py mail"
diff --git a/roles/postfix/meta/main.yml b/roles/postfix/meta/main.yml
deleted file mode 100644 (file)
index 3de0130..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-- { role: letsencrypt }
diff --git a/roles/prosody/meta/main.yml b/roles/prosody/meta/main.yml
deleted file mode 100644 (file)
index 3de0130..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-- { role: letsencrypt }
index 3c5fe4e43edb60144639bc72bb25bc0497386e88..32c2a20ead38a9cdd9120e1ba6a0853ca2132f54 100644 (file)
--- a/site.yml
+++ b/site.yml
   - letsencrypt
   tags: letsencrypt
 
   - letsencrypt
   tags: letsencrypt
 
-# FIXME make this a role, or several
-- import_playbook: email.yml
+- hosts: email
+  gather_facts: no
+  roles:
+  - email
+  tags: email
+
+- hosts: journalwatch
+  gather_facts: no
+  roles:
+  - journalwatch
+  tags: journalwatch
 
 - hosts: bind
   gather_facts: no
 
 - hosts: bind
   gather_facts: no