Skip to content

Instantly share code, notes, and snippets.

@shinnya
Forked from pgilad/create-temp-dir.yml
Created October 15, 2016 04:02
Show Gist options
  • Save shinnya/927067ccd096191bae3da526975a2cfa to your computer and use it in GitHub Desktop.
Save shinnya/927067ccd096191bae3da526975a2cfa to your computer and use it in GitHub Desktop.
Create a temp dir cross-platform in ansible
- name: create a local temp directory
local_action:
module: command mktemp -d "{{ lookup('env', 'TMPDIR') | default('/tmp/') }}ansible.XXXX"
register: mktemp_output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment