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

error:

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
586 views

2 answers to this question.

0 votes

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

Use the following syntax:

ansible-playbook -i hosts playbookname.yml

or 

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
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
1,267 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer