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/usb-install | |
parent | elevate banner even nicer (diff) |
mktemp vs tempfile module
Diffstat (limited to 'roles/usb-install')
-rw-r--r-- | roles/usb-install/tasks/main.yml | 9 |
1 files changed, 5 insertions, 4 deletions
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 |