Skip to content

Instantly share code, notes, and snippets.

@pspravin
Created April 19, 2017 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pspravin/f9d2aecf9eb5b19084a7dd5e9e95bc79 to your computer and use it in GitHub Desktop.
Save pspravin/f9d2aecf9eb5b19084a7dd5e9e95bc79 to your computer and use it in GitHub Desktop.
File name: hostname.yml
location: /u02/ansible/ansible/playbooks
Content of the file:
- hosts: all
- tasks:
- command: hostname
Command:
[ansible@calaces_dev_server2 ansible]$ ansible-playbook playbooks/hostname.yml
Error:
[ansible@calaces_dev_server2 ansible]$ ansible-playbook playbooks/hostname.yml
ERROR! 'command' is not a valid attribute for a Play
The error appears to have been in '/u02/ansible/ansible/playbooks/hostname.yml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- tasks:
- command: hostname
^ here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment