I'm using 'unarchive' to extract a tarball to /tmp/  Inside, I have a shell 
script with includes references to relative paths.  This made my script 
fail as it was looking for the files relative to whatever directory it's 
running from.  Looking at 'shell' and 'command' I see a chdir argument, but 
I cannot get it to work.  If I:

    command: insert_certs.sh chdir=/tmp/dod_java_certs/

I get:

TASK: [Run DoD certificate installer] 
***************************************** 
failed: [vdara] => {"cmd": "insert_certs.sh", "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory

If I:

    command: insert_certs.sh
    args:
      chdir=/tmp/dod_java_certs/

I get:

TASK: [Run DoD certificate installer] 
***************************************** 
fatal: [vdara] => args must be a dictionary, received 
chdir=/tmp/dod_java_certs/

I get the same problems when using 'shell'.  I was, though, able to:

    shell: "cd /tmp/dod_java_certs; ./insert_certs.sh"

So how would one correctly use the chdir argument?

-- 
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/3e3bddba-92aa-468c-ae8a-ab482ef17e00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to