ERROR! playbooks must be a list of plays
The error appears to have been in 'env/dev': line 1, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
localhost ansible_ssh_port=22 ansible_ssh_host=127.0.0.1 ansible_connection=local
^ here
Solution: you will get such issue, if you are not passing -i parameter before your inventory file, as that file is unreachable.
Note correct
ansible-playbook env/dev web.yml
Correct formatted web.yml
ansible-playbook -i env/dev web.yml
PLAY RECAP *********************************************************************
localhost : ok=6 changed=3 unreachable=0 failed=0
Works like anything ansible-playbook -i env/dev web.yml, only -i were missing.
ReplyDeleteNice Post
ReplyDeleteangularjs training in Bangalore
angularjs training institutes in Bangalore
best angularjs training in Bangalore