new synchronize module: can't specify relative path in playbook

I’m trying the following:

  • name: Ensure adminer installed and up to date
    synchronize:
    src=roles/mysql/templates/adminer.php
    dest=/var/www/adminer.php

I first tried just specifying the file name, as it should be automatically found in the templates.
I always get a version of this message on failure:

msg: rsync: link_stat “/root/adminer.php” failed: No such file or directory (2)

Am I doing something wrong?

I suspect it already knows about your role path and you are specifying too much, but is that the full output? If so that seems suboptimal and you should file a ticket.

– Michael

No, that was clipped error message.

I tried specifying the full path on a different role in the same playbook, and got pretty much the same thing:

failed: [aws01] => {“cmd”: “rsync --delay-updates --compress --timeout=10 --archive --rsh ‘ssh -o StrictHostKeyChecking=no’ --out-format=‘<>%i %n%L’ /home/shaun/bt/am/ /var/www/servers/am/”, “failed”: true, “rc”: 23}
msg: rsync: change_dir “/home/shaun/bt/am” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]

Before filing a ticket, I’ll transfer playbook to a different machine as I suspect I’ve messed something up with all of the hacking I’ve done in /usr/share/ansible/ while trying to figure out how to make my own modules. May need to do a full reinstall.