From 76fc27b3c7794d65722d5160366f93fd1150bb66 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 22 Dec 2018 01:13:40 +0100 Subject: mktemp vs tempfile module --- roles/usb-install/tasks/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'roles/usb-install') diff --git a/roles/usb-install/tasks/main.yml b/roles/usb-install/tasks/main.yml index 1523aedc..fab32b02 100644 --- a/roles/usb-install/tasks/main.yml +++ b/roles/usb-install/tasks/main.yml @@ -1,22 +1,23 @@ --- - block: - name: Create temporary workdir - command: mktemp -d + tempfile: + state: directory register: tmpdir - import_role: name: preseed vars: - preseed_tmpdir: "{{ tmpdir.stdout }}" + preseed_tmpdir: "{{ tmpdir.path }}" - name: Copy the preseed initramfs to the artifacts directory copy: - src: "{{ tmpdir.stdout }}/initrd.preseed.gz" + src: "{{ tmpdir.path }}/initrd.preseed.gz" dest: "{{ artifacts_dir }}/" always: - name: Cleanup temporary workdir file: - path: "{{ tmpdir.stdout }}" + path: "{{ tmpdir.path }}" state: absent -- cgit v1.2.3