I think I may have uncovered a bug in the template module. Whatever I do, I 
can't remove inserted quotes for a dest path which are inserted by Ansible.
The same combination DOES work for other modules. 

I have tried using the join filter but this produces the same results!

Below is the relevant debug info:

------------------

vars:
xbmc_docker_dir: xbmc
docker_home: /opt/docker

- name: Create advanced_settings file for our Mysql XBMC server
  template: src=advancedsettings.xml.j2
            
dest={{docker_home}}/{{xbmc_docker_dir}}/xbmcdata/userdata/advancedsettings.xml
            owner=root
            group=root
            mode=0644

Error:
TASK: [xbmc-headless-docker | Create advanced_settings file for our Mysql 
XBMC server] ***
failed: [thorn.home.stanandliz.net] => {"failed": true}
msg: Destination directory "/opt/docker"/"xbmc"/xbmcdata/userdata does not 
exist

FATAL: all hosts have already failed -- aborting

--------------

I have had to horribly hard code the paths in my dest command as a 
temporary workaround - please help me remove the abomination! :)

This variable combination/concatenation DOES work for the command module - 
for example the following runs the docker command with no problem ( I do 
know I can use the docker module for this but am testing to see wtf works 
and what doesn't...... )

- name: Run the docker image
  command: docker run -d --net=host --privileged -v 
"{{docker_home}}"/"{{xbmc_docker_dir}}"/xbmcdata/:/opt/xbmc-server/portable_data
 
-v "{{mount_point}}":"{{mount_point}}" wernerb/docker-xbmc-server

-- 
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/6a786da6-4b84-4c2b-972b-f327b88f236f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to