This website requires JavaScript.
Explore
Help
Sign in
ansible
/
community.general
Watch
1
Star
0
Fork
You've already forked community.general
0
mirror of
https://github.com/ansible-collections/community.general.git
synced
2024-09-14 20:13:21 +02:00
Code
Releases
Activity
fb96173d10
community.general
/
test
/
integration
/
roles
/
test_template
/
files
/
foo.txt
9 lines
109 B
Text
Raw
Normal View
History
Unescape
Escape
Add test_stat role
2014-02-19 22:44:42 +01:00
templated_var_loaded
Don't convert numbers and booleans to strings. Before this change if a variable was of type int or bool and the variable was referenced by another variable, the type would change to string. eg. defaults/main.yml ``` PORT: 4567 OTHER_CONFIG: secret1: "so_secret" secret2: "even_more_secret" CONFIG: hostname: "some_hostname" port: "{{ PORT }}" secrets: "{{ OTHER_CONFIG }}" ``` If you output `CONFIG` to json or yaml, the port would get represented in the output as a string instead of as a number, but secrets would get represented as a dictionary. This is a mis-match in behaviour where some "types" are retained and others are not. This change should fix the issue. Update template test to also test var retainment. Make the template changes in v2. Update to only short-circuit for booleans and numbers. Added an entry to the changelog.
2015-03-14 21:26:48 +01:00
{
to_nice_json filter no longer has a trailing space when formatting dicts
2015-04-30 17:52:02 +02:00
"bool": true,
"multi_part": "1Foo",
"number": 5,
Don't convert numbers and booleans to strings. Before this change if a variable was of type int or bool and the variable was referenced by another variable, the type would change to string. eg. defaults/main.yml ``` PORT: 4567 OTHER_CONFIG: secret1: "so_secret" secret2: "even_more_secret" CONFIG: hostname: "some_hostname" port: "{{ PORT }}" secrets: "{{ OTHER_CONFIG }}" ``` If you output `CONFIG` to json or yaml, the port would get represented in the output as a string instead of as a number, but secrets would get represented as a dictionary. This is a mis-match in behaviour where some "types" are retained and others are not. This change should fix the issue. Update template test to also test var retainment. Make the template changes in v2. Update to only short-circuit for booleans and numbers. Added an entry to the changelog.
2015-03-14 21:26:48 +01:00
"string_num": "5"
}
Copy permalink