Hey all,
I'm trying to unzip a file into a directory relative to the home directory
on a host server. The problem is that when Ansible runs the unarchive
module, it replaces the tilde in the variable with master server's home
directory instead of the host server's. The file module correctly creates
the directory on the host server. Here's the playbook I'm using
- hosts: myhost
vars:
mydir: "~/folder1/folder2/"
user: myuser
tasks:
- name: Ensure the parent directory is present
file: >
path={{ mydir }}
state=directory
- name: Unzip the file into the host
unarchive: >
src=/ansible/archive/file.zip
dest={{ mydir }}
Is there some argument I can give to unarchive so that it tries to unzip
into the right directory? I've tried setting the HOME environment variable
to the correct home directory on the host, but that does not make a
difference.
Thanks,
Chip
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/9f947d6b-98fa-478a-a901-45b2a5f8d9f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.