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:
parent
0cadb952f9
commit
8ebc57c186
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue