You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As https://github.com/whitecloud/ansible-styleguide#quotes stated, single quotes should be preferred for strings; double quotes are only allowed if embedded in Jinja templates. But it seems that I found an exception from my work where only double quotes work, but single quotes do not.
As https://github.com/whitecloud/ansible-styleguide#quotes stated, single quotes should be preferred for strings; double quotes are only allowed if embedded in Jinja templates. But it seems that I found an exception from my work where only double quotes work, but single quotes do not.
Output:
The output shows that the
split()
function doesn't work for single-quoted strings.Why do I use double quotes for
tabbed_strings
in the above case? Because I found it is how Ansible'sregister
produces strings from stdout.The official Ansible YAML syntax documentation stated that single quotes don't work with escape characters.
The text was updated successfully, but these errors were encountered: