diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-12-22 01:13:40 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-12-22 01:13:40 +0100 |
commit | 76fc27b3c7794d65722d5160366f93fd1150bb66 (patch) | |
tree | 6ef37537ff7217d4f43541d31fed0dc4e782e7da /roles/acmetool | |
parent | elevate banner even nicer (diff) |
mktemp vs tempfile module
Diffstat (limited to 'roles/acmetool')
-rw-r--r-- | roles/acmetool/base/tasks/selfsigned.yml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/roles/acmetool/base/tasks/selfsigned.yml b/roles/acmetool/base/tasks/selfsigned.yml index c533979c..f5fb0466 100644 --- a/roles/acmetool/base/tasks/selfsigned.yml +++ b/roles/acmetool/base/tasks/selfsigned.yml @@ -15,15 +15,18 @@ register: existing_selfsigned_interim_cert_stat - name: create selfsigned interim certificate - when: existing_selfsigned_interim_cert_id == "" or not existing_selfsigned_interim_cert_stat.stat.exists + when: not existing_selfsigned_interim_cert_id or not existing_selfsigned_interim_cert_stat.stat.exists block: - name: create temporary directory - command: mktemp -d /var/lib/acme/tmp/selfsigned-interim-cert-XXXXXXXXXX + tempfile: + path: /var/lib/acme/tmp + prefix: selfsigned-interim-cert- + state: directory register: tmpdir - name: set tmpdir variable set_fact: - tmpdir: "{{ tmpdir.stdout }}" + tmpdir: "{{ tmpdir.path }}" - name: generate private key for selfsigned interim certificate openssl_privatekey: |