and by the way, comments like "but it is little things like that making it look like not mature enough" are not going to incite a lot of people to help you :-) Ansible is very useful to a lot of people (like myself), and like any project, it has room for improvement and as an open source project, it relies on a healthy active community to use it and hopefully contribute back to it.
- GS On Wed, Dec 11, 2013 at 8:45 AM, Matt Martz <[email protected]> wrote: > The recursive copy functionality was added for 1.4. The current version > of ansible is 1.4.1. > > I would recommend upgrading. > > > On Tuesday, December 10, 2013, Guillem Liarte wrote: > >> Re-using old thread. >> >> I have something like this: >> >> - name: Check-out latest Wordpress Skeleton >> copy: src=/etc/ansible/roles/web/files/WordPress-Skeleton/ >> dest=/data/public/{{ customer }}/test owner={{ httpd-user }} group={{ >> httpd-user }} >> tags: wordpress >> >> As per notes: >> >> Local path to a file to copy to the remote server; can be absolute or >>> relative. If path is a directory, it is copied recursively. In this case, >>> if path ends with "/", only inside contents of that directory are copied to >>> destination. Otherwise, if it does not end with "/", the directory itself >>> with all contents is copied. This behavior is similar to Rsync. >>> >> >> So, yes, I expected the contents to be recursively copied. But instead I >> get: >> >> fatal: [ndoluxel001] => Traceback (most recent call last): >>> File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", >>> line 382, in _executor >>> exec_rc = self._executor_internal(host, new_stdin) >>> File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", >>> line 471, in _executor_internal >>> return self._executor_internal_inner(host, self.module_name, >>> self.module_args, inject, port, complex_args=complex_args) >>> File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", >>> line 653, in _executor_internal_inner >>> module_args = template.template(self.basedir, module_args, inject, >>> fail_on_undefined=self.error_on_undefined_vars) >>> File "/usr/lib/python2.6/site-packages/ansible/utils/template.py", >>> line 310, in template >>> varname = template_from_string(basedir, varname, vars, >>> fail_on_undefined) >>> File "/usr/lib/python2.6/site-packages/ansible/utils/template.py", >>> line 512, in template_from_string >>> res = >>> jinja2.utils.concat(t.root_render_func(t.new_context(_jinja2_vars(basedir, >>> vars, t.globals, fail_on_undefined), shared=True))) >>> File "<template>", line 12, in root >>> TypeError: unsupported operand type(s) for -: 'StrictUndefined' and >>> 'StrictUndefined' >>> >> Boom! >> >> Yes, this is from and to the same host. ansible 1.3.4 >> >> Side note, I use CFEngine and Puppet for other projects and I am trying >> to get to do similar things with Ansible, but it is little things like that >> making it look like not mature enough. >> >> I am not a developer, but can do some python. What suggestions do you >> have for me in order to fix this, and where should I look? >> >> Thanks! >> >> >> >> On Sunday, 15 September 2013 01:42:26 UTC+2, Jason Harris wrote: >>> >>> I seem to recall seeing somewhere that v1.3 allowed some sort of >>> recursive copying without resorting to a local command of rsync. But I >>> can't seem to find this again after looking again... Am I missing something >>> or do we still need to use this workaround? >>> >>> Thanks, >>> Jason >>> >> -- >> 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]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > -- > Matt Martz > [email protected] > http://sivel.net/ > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
