Error saying "Extraneous options or arguments" when trying to run an ansible playbook

0 votes

Hey, I'm very new to ansible. I tried running a simple ansible playbook using the following command but it failed and gave me an error instead.

ansible playbook auto.yml


Usage: ansible <host-pattern> [options]
Define and run a single task 'playbook' against a set of hostsERROR! Extraneous options or arguments

What am I doing wrong?

Jan 21 in Ansible by Nisha

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Nisha, You are using the wrong command to execute your playbook.

Use the following syntax:

ansible-playbook -i hosts playbookname.yml


ansible-playbook playbook-name.yml
answered Jan 21 by Sariak
0 votes
ERROR! Extraneous options or arguments
answered May 30 by anonymous

hey, Sariak's solution did not work?

Related Questions In Ansible

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Is it possible to run an Ansible Playbook in python script?

Hey @Cerci, Of course its possible. You ...READ MORE

answered Jan 17 in Ansible by Nicolas
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.