Dear List,

I'm trying to have a template placed on some servers and while the file is 
beeing placed to contain the contents of another file (Public key) like so:
http://jinja.pocoo.org/docs/templates/#include

*encapmodule-properties.j2:*

encap-public-key={% include '/opt/encapserver.crt' %}
assertion-time-skew=5
registrationIdLdapAttrName=binckMobileDeviceID
includeSignatureValidation=true
includeBeforeAndAfterValidation=true
includeIssuerValidation=false
includeStatusCodeValidation=false
expectedIssuer=encap


As you can see, I tried to include the "/opt/encapserver.crt" file on the 
machine beeing managed at that moment.

mmaas@xmgtansible:~/playbooks$ ansible-playbook forge_rock.yml -l t1atham* 
-vvvv --tags=test
But i'm running into this error:
TASK: [openam | Plaats binck_encapmodule.properties] 
**************************
<t1athamyar> ESTABLISH CONNECTION FOR USER: mmaas
<t1athamyar> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 
'ControlPersist=60s', '-o', 
'ControlPath=/home/mmaas/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 
'StrictHostKeyChecking=no', '-o', 'Port=22', '-o', 
'KbdInteractiveAuthentication=no', '-o', 
'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', 
'-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', 't1athamyar', 
"/bin/sh -c 'mkdir -p 
$HOME/.ansible/tmp/ansible-1395828889.82-55430178152696 && chmod a+rx 
$HOME/.ansible/tmp/ansible-1395828889.82-55430178152696 && echo 
$HOME/.ansible/tmp/ansible-1395828889.82-55430178152696'"]
fatal: [t1athamyar] => {'msg': '/opt/encapserver.crt', 'failed': True}
fatal: [t1athamyar] => {'msg': '/opt/encapserver.crt', 'failed': True} 


Any idea's?

I could ofcourse simply "cat" the contents of that file and register the 
output as a variable. And then use that variabel. But that would not be as 
clean as when using jinja2 stuff directly ;-)

Thanks,
Mark

-- 
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/62a5e8f9-4df1-4101-8221-47e9d44382ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to