On Friday, January 4, 2019 at 11:34:13 AM UTC-7, Kai Stian Olstad wrote:
>
> On Friday, 4 January 2019 19:04:38 CET John Harmon wrote: 
> > I have found other docs on this, but can't seem to "fix" my issue with 
> what 
> > I am finding.  Consider the following playbook: 
> > 
> > - hosts: mybackup 
> >   gather_facts: false 
> >   vars: 
> >     one_week: "/devbackup/nonprod_images/one_week_old" 
> >     two_week: "/devbackup/nonprod_images/two_week_old" 
> >   tasks: 
> >     ... 
> >     - name: "Retrieve backups from mybackup02" 
> >       synchronize: 
> >         src: /dbbackup/nonprod_images/* #<-- This is on server mybackup 
> >         dest: "rsync://mybackup{{ one_week }}/" 
> >         mode: push 
> >         archive: yes 
> >         dirs: yes 
> >         perms: yes 
> >         recursive: yes 
> >         times: yes 
> >         rsync_path: /bin/rsync 
> >       delegate_to: mybackup02 
>
> With push mode and delegate_to src: is mybackup02 and dest is mybackup, 
> based on your comment after src: I guess you need to use pull mode instead. 
> But that contradict the text in name: for the task. 
>
> Dest can only contain the path, absolute or relative, not rsync://, the 
> module doesn't support rsync protocol, it can only synchronize over ssh. 
>
>
> > Probably just need another pair of eyes... I seem to be missing 
> something.   
> > SSH keys are setup between the two servers.  rsyncs work outside of 
> ansible 
> > just fine. 
>
> Are you sure you tested with the user that is running the Ansible 
> playbook? 
>
> -- 
> Kai Stian Olstad 
>
>
>
Yes, absolutely positive that I have tested it with the user that is 
running the ansible playbook. 
I am trying to rsync from mybackup02 to mybackup, so the src and 
destination should be correct.
According to the docs, the dest can have the rsync.  See second and third 
examples:
https://docs.ansible.com/ansible/latest/modules/synchronize_module.html

As I understand it, in pull mode you can't use delegate_to, and is 
therefore only good for localhost to remotehost, not remote to remote.

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c1278288-42c1-4b9f-9715-c56a38fc97a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to