ansible-role-yedit
ansible-role-yedit copied to clipboard
Replaces empty values with the string "null"
If I have a file like the following, the password
value will actually be changed to null
.
This:
db:
host: example.com
user: test
password:
Becomes:
db:
host: example.com
password: null
user: test
This happens even when editing totally unrelated values in other parts of the config which should obviously not be happening.
Noticed a similar issue - I guess it's related - where the value becomes None
when it's left blank. If you set the value to ~
(the YAML character for null
), it also ends up as None
.
I've got around this in a particular implementation by just setting the value to an empty array []
, but whether or not that works probably depends on what's parsing the YAML in the end.