Closed halberom closed 7 years ago
folded scalar, or any form of key=value in yaml in many cases fails to maintain type.
key=value
e.g.
--- - hosts: localhost connection: local gather_facts: False tasks: - set_fact: > myvar=123 - debug: > msg={{ myvar is number }}
PLAY [localhost] ********************************************************************************************************************** TASK [set_fact] *********************************************************************************************************************** ok: [localhost] TASK [debug] ************************************************************************************************************************** ok: [localhost] => { "msg": false } PLAY RECAP **************************************************************************************************************************** localhost : ok=2 changed=0 unreachable=0 failed=0
It is better to use a structured map format
--- - hosts: localhost connection: local gather_facts: False tasks: - set_fact: myvar: 123 - debug: msg: "{{ myvar is number }}"
See a really good write up about it here - https://www.jeffgeerling.com/blog/yaml-best-practices-ansible-playbooks-tasks
wow, never mind, just noticed the parser args for the generate.py script.
folded scalar, or any form of
key=value
in yaml in many cases fails to maintain type.e.g.
It is better to use a structured map format
See a really good write up about it here - https://www.jeffgeerling.com/blog/yaml-best-practices-ansible-playbooks-tasks