Excerpts from Michael DeHaan's message of 2013-04-15 16:13:33 -0400:
> You seem to be missing something in your copy/paste as the variable is
> named foo in one place and doit in the other.S
Ahh, sorry about that; the variable was supposed to be the same in both
places.
> Note YAML interprets "foo: yes" as a Boolean, you would have to quote
> strings to keep them strings.
I'm aware of the yaml behavior, but the issue I'm having is instead
this:
If you specify a value in a playbook or vars file or whatnot, things
like "yes" and "no" become real booleans, as expected.
If you specify a value via -e, and use something like "yes" or "no" as
it's value, the value stays a string.
So:
- hosts: 127.0.0.1
vars:
foo: yes
tasks:
- debug: msg="{{ foo }}"
prints 'True', while:
- hosts: 127.0.0.1
tasks:
- debug: msg="{{ foo }}"
called with a -e "foo=yes" prints 'yes'.
The inconsistency there is what I'm wondering about.
--
Morgan Hamill
<
cha...@wesleyan.edu>