Hi All,
I am experimenting with the Assemble module to join two files together but
not having much luck:
---
- hosts: testhosts2
sudo: yes
tasks:
- name: Test Task
assemble: src=common/new.file
dest=/etc/test.file
remote_src=false
I added the *remote_src=false* after reading some suggestions in various
forums but it still not working. Both files definitely exist. Its strange
because other modules work fine with the local src and remote dest
parameters like "copy"
Output with remote_source=false
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File
"/usr/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/executor/process/worker.py"
, line 118, in run
executor_result = TaskExecutor(host, task, job_vars, new_connection_info
, self._new_stdin, self._loader, shared_loader_obj).run()
File
"/usr/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/executor/task_executor.py"
, line 111, in run
res = self._execute()
File
"/usr/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/executor/task_executor.py"
, line 281, in _execute
result = self._handler.run(task_vars=variables)
File
"/usr/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/plugins/action/assemble.py"
, line 104, in run
path = self._assemble_from_fragments(src, delimiter, _re, ignore_hidden)
File
"/usr/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/plugins/action/assemble.py"
, line 45, in _assemble_from_fragments
for f in sorted(os.listdir(src_path)):
OSError: [Errno 20] Not a directory: '/root/ansible/common/new.file'
fatal: [10.1.1.12]: FAILED! => {"failed": true, "stdout": ""}
Output without remote_src=false
fatal: [10.1.1.12]: FAILED! => {"msg": "Source (common/new.file) does not
exist", "failed": true, "changed": false, "invocation": {"module_name":
"assemble", "module_args": {"dest": "/etc/test.file", "src":
"common/new.file"}}}
local file
[[email protected] ansible]# ls -l common/
total 12
-rw-r--r--. 1 root root 39 Jan 27 16:39 new.file
-rw-r--r--. 1 root root 120 Jan 27 10:08 vmware-tools.repo
--
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/45753529-326a-4570-a8d7-669d9f3a359e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.