Copy to local

35 views
Skip to first unread message

larry....@smarthealth.com.au

unread,
Mar 1, 2016, 1:28:37 AM3/1/16
to Ansible Project
I am trying to write a file to my local machine with a dynamic inventory. I am running the following script in Ansible Tower:
---
- hosts: all
  tasks:
  - name: Copy the file
    connection: local
    run_once: true
    copy: content="Hello, World!" dest=/tmp/hello.txt

This works when I run it without the connection: local (it ends up on the first matching host), but with connection: local the file does not appear, even though Ansible Tower shows that there was something changed. I have tried delegate_to: 127.0.0.1 and local_action: and in none of these cases do I find the file in /tmp.

Am I doing something wrong or is this a problem with Ansible?

Ansible version 2.0.1.0, Ansible Tower version 2.4.4.

Brian Coca

unread,
Mar 1, 2016, 8:38:31 AM3/1/16
to ansible...@googlegroups.com
for tower issues please email sup...@ansible.com or go to http://support.ansible.com.

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b09b7eac-a5dc-47e9-ab0e-53b60c54a6ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages