-
Notifications
You must be signed in to change notification settings - Fork 682
Open
Description
ansible-playbook --syntax-check create-user.yml -e "hosts=test user_name=test"
ERROR! The field 'hosts' has an invalid value, which includes an undefined variable. The error was: 'inventory' is undefined
The error appears to be in '/etc/ansible/create-user.yml': line 5, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
-
hosts: '{{inventory}}'
^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Metadata
Metadata
Assignees
Labels
No labels