Hi, I have a variable set up like this:
ansible_ssh_user: “{{ lookup(‘env’, ‘USER’) }}”
all the commands execute fine, until I get to the point where I want to use the synchronize module, where it fails with:
failed: [vmArServer] => {“failed”: true, “item”: “”}
msg: this module requires key=value arguments ([‘src=…/…/frontEnd/*’, ‘private_key=/home/dario/.vagrant.d/insecure_private_key’, ‘dest_port=22’, ‘recursive=yes’, ‘dest={{lookup(env,’, ‘USER)}}@10.0.46.164:/var/www/nginx’, ‘delete=yes’, ‘archive=yes’, ‘rsync_path=sudo rsync’])
If I change ansible_ssh_user, hardcoding it with my user, it works fine… but “”“{{lookup(env,', 'USER)}}”“” seems really weird: it almost looks like there would be some extra quotes around my lookup, but I reckon that would trigger an error much earlier
Has anyone seen something like this?
Thanks