summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-06-15 18:08:48 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-06-15 18:13:09 +0200
commit02d4a5892bb3019d448c453ad279788fcd3f1531 (patch)
treef8e023267ac8af5cab8aa5413c52c37c6d9257af /roles
parent97e78349145156ca6565ee5b2af54983a6fdd3a6 (diff)
certs/public: fetch each cert's pubkey (SPKI), not the cert itself.
To avoid new commits upon cert renewal.
Diffstat (limited to 'roles')
-rw-r--r--roles/IMAP/tasks/imap.yml2
-rw-r--r--roles/MSA/tasks/main.yml2
-rw-r--r--roles/MX/tasks/main.yml2
-rw-r--r--roles/git/tasks/cgit.yml2
-rw-r--r--roles/lists/tasks/nginx.yml2
-rw-r--r--roles/webmail/tasks/roundcube.yml2
-rw-r--r--roles/wiki/tasks/main.yml2
7 files changed, 7 insertions, 7 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml
index a596c42..d7bbfb9 100644
--- a/roles/IMAP/tasks/imap.yml
+++ b/roles/IMAP/tasks/imap.yml
@@ -63,41 +63,41 @@
- flagged
- recent
- unseen
- name: Create directory /home/mail/spamspool
file: path=/home/mail/spamspool
state=directory
owner=vmail group=vmail
mode=0700
- name: Create directory /etc/dovecot/ssl
file: path=/etc/dovecot/ssl
state=directory
owner=root group=root
mode=0755
- name: Fetch Dovecot's X.509 certificate
# Ensure we don't fetch private data
become: False
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/dovecot/ssl/imap.fripost.org.pem
dest=certs/public/imap.fripost.org.pem
tags:
- genkey
- name: Configure Dovecot
copy: src=etc/dovecot/{{ item }}
dest=/etc/dovecot/{{ item }}
owner=root group=root
mode=0644
register: r1
with_items:
- conf.d/10-auth.conf
- conf.d/10-logging.conf
- conf.d/10-mail.conf
- conf.d/10-ssl.conf
- conf.d/15-mailboxes.conf
- conf.d/20-imap.conf
- conf.d/20-lmtp.conf
- conf.d/90-plugin.conf
diff --git a/roles/MSA/tasks/main.yml b/roles/MSA/tasks/main.yml
index d9a3d47..7ae2680 100644
--- a/roles/MSA/tasks/main.yml
+++ b/roles/MSA/tasks/main.yml
@@ -11,41 +11,41 @@
mode=0644
notify:
- Reload Postfix
- name: Copy the Regex to anonymize senders
# no need to reload upon change, as cleanup(8) is short-running
copy: src=etc/postfix/anonymize_sender.pcre
dest=/etc/postfix-{{ postfix_instance[inst].name }}/anonymize_sender.pcre
owner=root group=root
mode=0644
- meta: flush_handlers
- name: Start Postfix
service: name=postfix state=started
- name: Fetch Postfix's X.509 certificate
# Ensure we don't fetch private data
become: False
# `/usr/sbin/postmulti -i msa -x /usr/sbin/postconf -xh smtpd_tls_cert_file`
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/postfix/ssl/smtp.fripost.org.pem
dest=certs/public/smtp.fripost.org.pem
tags:
- genkey
- name: Install 'postfix_mailqueue_' Munin wildcard plugin
file: src=/usr/local/share/munin/plugins/postfix_mailqueue_
dest=/etc/munin/plugins/postfix_mailqueue_postfix-{{ postfix_instance[inst].name }}
owner=root group=root
state=link force=yes
tags:
- munin
- munin-node
notify:
- Restart munin-node
- name: Install 'postfix_stats_' Munin wildcard plugin
file: src=/usr/local/share/munin/plugins/postfix_stats_
dest=/etc/munin/plugins/postfix_stats_{{ item }}_postfix-{{ postfix_instance[inst].name }}
diff --git a/roles/MX/tasks/main.yml b/roles/MX/tasks/main.yml
index 62ffa02..f95945c 100644
--- a/roles/MX/tasks/main.yml
+++ b/roles/MX/tasks/main.yml
@@ -65,41 +65,41 @@
owner=root group=root
mode=0644
notify:
- Reload Postfix
- name: Copy reserved-alias.pl
copy: src=usr/local/bin/reserved-alias.pl
dest=/usr/local/bin/reserved-alias.pl
owner=root group=root
mode=0755
- meta: flush_handlers
- name: Start Postfix
service: name=postfix state=started
- name: Fetch Postfix's X.509 certificate
# Ensure we don't fetch private data
become: False
# `/usr/sbin/postmulti -i mx -x /usr/sbin/postconf -xh smtpd_tls_cert_file`
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/postfix/ssl/mx.fripost.org.pem
dest=certs/public/mx{{ mxno | default('') }}.fripost.org.pem
tags:
- genkey
- name: Install 'postfix_mailqueue_' Munin wildcard plugin
file: src=/usr/local/share/munin/plugins/postfix_mailqueue_
dest=/etc/munin/plugins/postfix_mailqueue_postfix-{{ postfix_instance[inst].name }}
owner=root group=root
state=link force=yes
tags:
- munin
- munin-node
notify:
- Restart munin-node
- name: Install 'postfix_stats_' Munin wildcard plugin
file: src=/usr/local/share/munin/plugins/postfix_stats_
dest=/etc/munin/plugins/postfix_stats_{{ item }}_postfix-{{ postfix_instance[inst].name }}
diff --git a/roles/git/tasks/cgit.yml b/roles/git/tasks/cgit.yml
index 532ca10..48f4d18 100644
--- a/roles/git/tasks/cgit.yml
+++ b/roles/git/tasks/cgit.yml
@@ -88,25 +88,25 @@
- Restart Nginx
- name: Create /etc/nginx/sites-enabled/git
file: src=../sites-available/git
dest=/etc/nginx/sites-enabled/git
owner=root group=root
state=link force=yes
register: r2
notify:
- Restart Nginx
- name: Start Nginx
service: name=nginx state=started
when: not (r1.changed or r2.changed)
- meta: flush_handlers
- name: Fetch Nginx's X.509 certificate
# Ensure we don't fetch private data
become: False
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/nginx/ssl/git.fripost.org.pem
dest=certs/public/git.fripost.org.pem
tags:
- genkey
diff --git a/roles/lists/tasks/nginx.yml b/roles/lists/tasks/nginx.yml
index caa1abf..fa52781 100644
--- a/roles/lists/tasks/nginx.yml
+++ b/roles/lists/tasks/nginx.yml
@@ -11,25 +11,25 @@
- Restart Nginx
- name: Create /etc/nginx/sites-enabled/sympa
file: src=../sites-available/sympa
dest=/etc/nginx/sites-enabled/sympa
owner=root group=root
state=link
register: r2
notify:
- Restart Nginx
- name: Start nginx
service: name=nginx state=started
when: not (r1.changed or r2.changed)
- meta: flush_handlers
- name: Fetch Nginx's X.509 certificate
# Ensure we don't fetch private data
become: False
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/nginx/ssl/lists.fripost.org.pem
dest=certs/public/lists.fripost.org.pem
tags:
- genkey
diff --git a/roles/webmail/tasks/roundcube.yml b/roles/webmail/tasks/roundcube.yml
index 998026c..24f8fa7 100644
--- a/roles/webmail/tasks/roundcube.yml
+++ b/roles/webmail/tasks/roundcube.yml
@@ -122,25 +122,25 @@
- Restart Nginx
- name: Create /etc/nginx/sites-enabled/roundcube
file: src=../sites-available/roundcube
dest=/etc/nginx/sites-enabled/roundcube
owner=root group=root
state=link force=yes
register: r2
notify:
- Restart Nginx
- name: Start Nginx
service: name=nginx state=started
when: not (r1.changed or r2.changed)
- meta: flush_handlers
- name: Fetch Nginx's X.509 certificate
# Ensure we don't fetch private data
become: False
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/nginx/ssl/mail.fripost.org.pem
dest=certs/public/mail.fripost.org.pem
tags:
- genkey
diff --git a/roles/wiki/tasks/main.yml b/roles/wiki/tasks/main.yml
index 5713513..c07d4f7 100644
--- a/roles/wiki/tasks/main.yml
+++ b/roles/wiki/tasks/main.yml
@@ -85,37 +85,37 @@
file: src=../sites-available/{{ item }}
dest=/etc/nginx/sites-enabled/{{ item }}
owner=root group=root
state=link force=yes
register: r2
with_items:
- website
- wiki
notify:
- Restart Nginx
- name: Start Nginx
service: name=nginx state=started
when: not (r1.changed or r2.changed)
- meta: flush_handlers
- name: Fetch Nginx's X.509 certificate
# Ensure we don't fetch private data
become: False
- fetch_cmd: cmd="openssl x509"
+ fetch_cmd: cmd="openssl x509 -noout -pubkey"
stdin=/etc/nginx/ssl/www.fripost.org.pem
dest=certs/public/fripost.org.pem
tags:
- genkey
- name: Create directory /var/www/fripost.org/autoconfig/mail
file: path=/var/www/fripost.org/autoconfig/mail
state=directory
owner=root group=root
mode=0755
- name: Copy /var/www/fripost.org/autoconfig/mail/config-v1.1.xml
copy: src=var/www/fripost.org/autoconfig/mail/config-v1.1.xml
dest=/var/www/fripost.org/autoconfig/mail/config-v1.1.xml
owner=root group=root
mode=0644