Have two roles, both with templates.
I have defined variables for both in a host_vars/HostFileName
One role’s template works without issues and the second gets “false” instead of the variables contents.
Any ideas or suggestions?
What really has me puzzled is the fact that one template works, but not the other.
ansible 1.8 (devel 9ae0fb5bdf) last updated 2014/11/03 20:17:43 (GMT -400)
lib/ansible/modules/core: (detached HEAD 63e81cfc2e) last updated 2014/11/03 20:18:01 (GMT -400)
lib/ansible/modules/extras: (detached HEAD a0df36c6ab) last updated 2014/11/03 20:18:01 (GMT -400)
v2/ansible/modules/core: (detached HEAD cb69744bce) last updated 2014/10/14 11:40:38 (GMT -400)
v2/ansible/modules/extras: (detached HEAD 8a4f07eecd) last updated 2014/10/14 11:40:41 (GMT -400)
sivel
(sivel)
2
I’d strongly recommend providing more information such as:
Template contents
Vars
Tasks
Generated output
Task output
A git repo or a multifile gist would be preferable.
Without this, I don’t think you have given much info to go on at all.
The issue seems to be related to the word ‘no’
I did a very large number of variations to troubleshoot and it came down to:
This works
sshrootlogin: ‘no’
sshpasswords: ‘no’
This doesn’t
sshrootlogin: no
sshpasswords: no
Given that I have variables, and have seen samples, that do not have to put single quotes I wonder if ‘no’ is a reserved word of sorts.
sivel
(sivel)
4
The bare word no has a special meaning of False in YAML:
http://yaml.org/type/bool.html
To use the literal word “no” it must be quoted.