diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-05-18 00:10:50 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-05-18 00:47:05 +0200 |
commit | 71aefcc229f999f92b25e51b9444b313d95fbc86 (patch) | |
tree | 0cfda622ac987e35543361dcc478dfe6b5b3fa08 /roles/MX/tasks | |
parent | f4c280d1c6f43f7ca0c1e498ab87fe7aa08d5eb2 (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/MX/tasks')
-rw-r--r-- | roles/MX/tasks/main.yml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/roles/MX/tasks/main.yml b/roles/MX/tasks/main.yml index 6ca11c0..62ffa02 100644 --- a/roles/MX/tasks/main.yml +++ b/roles/MX/tasks/main.yml @@ -65,44 +65,43 @@ 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: src=/etc/postfix/ssl/mx.fripost.org.pem - dest=certs/public/mx{{ mxno | default('') }}.fripost.org.pem - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + 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 }} owner=root group=root state=link force=yes |