Mention that Python keywords are invalid Ansible variable names (#65094)

* Mention that Python keywords are invalid Ansible variable names
Using a Python keyword as a variable name triggers the error `Invalid variable name in 'register' specified: 'return'`.
pull/65434/head
林博仁(Buo-ren Lin) 5 years ago committed by Alicia Cozine
parent 0cadb952f9
commit 8ebc57c186

@ -30,6 +30,8 @@ Variable names should be letters, numbers, and underscores. Variables should al
``foo-port``, ``foo port``, ``foo.port`` and ``12`` are not valid variable names.
`Python keywords <https://docs.python.org/3/reference/lexical_analysis.html#keywords>`_ such as ``async`` and ``lambda`` are not valid variable names and thus must be avoided.
YAML also supports dictionaries which map keys to values. For instance::
foo:

Loading…
Cancel
Save