From 71aefcc229f999f92b25e51b9444b313d95fbc86 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 18 May 2016 00:10:50 +0200 Subject: 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. --- roles/common/tasks/munin-node-ssl.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'roles/common/tasks/munin-node-ssl.yml') diff --git a/roles/common/tasks/munin-node-ssl.yml b/roles/common/tasks/munin-node-ssl.yml index 59ed7d7..e0b1d8c 100644 --- a/roles/common/tasks/munin-node-ssl.yml +++ b/roles/common/tasks/munin-node-ssl.yml @@ -21,10 +21,9 @@ - name: Fetch Munin X.509 certificate # Ensure we don't fetch private data become: False - fetch: src=/etc/stunnel/certs/munin-{{ inventory_hostname_short }}.pem - dest=certs/munin/{{ inventory_hostname }}.pem - fail_on_missing=yes - flat=yes + fetch_cmd: cmd="openssl x509" + stdin=/etc/stunnel/certs/munin-{{ inventory_hostname_short }}.pem + dest=certs/munin/{{ inventory_hostname }}.pem tags: - genkey -- cgit v1.2.3