summaryrefslogtreecommitdiffstats
path: root/roles/webmail/tasks/roundcube.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-05-18 00:10:50 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-05-18 00:47:05 +0200
commit71aefcc229f999f92b25e51b9444b313d95fbc86 (patch)
tree0cfda622ac987e35543361dcc478dfe6b5b3fa08 /roles/webmail/tasks/roundcube.yml
parentf4c280d1c6f43f7ca0c1e498ab87fe7aa08d5eb2 (diff)
Add an ansible module 'fetch_cmd' to fetch the output of a remote command locally.
And use this to fetch all X.509 leaf certificates.
Diffstat (limited to 'roles/webmail/tasks/roundcube.yml')
-rw-r--r--roles/webmail/tasks/roundcube.yml7
1 files changed, 3 insertions, 4 deletions
diff --git a/roles/webmail/tasks/roundcube.yml b/roles/webmail/tasks/roundcube.yml
index e416656..ab417e5 100644
--- a/roles/webmail/tasks/roundcube.yml
+++ b/roles/webmail/tasks/roundcube.yml
@@ -119,26 +119,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: src=/etc/nginx/ssl/mail.fripost.org.pem
- dest=certs/public/
- fail_on_missing=yes
- flat=yes
+ fetch_cmd: cmd="openssl x509"
+ stdin=/etc/nginx/ssl/mail.fripost.org.pem
+ dest=certs/public/mail.fripost.org.pem
tags:
- genkey