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'`.
This commit is contained in:
林博仁(Buo-ren Lin) 2019-12-02 23:42:40 +08:00 committed by Alicia Cozine
parent 0cadb952f9
commit 8ebc57c186

View file

@ -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: