Error saying ERROR sudo pass is not a legal parameter at this level in an Ansible Playbook

0 votes

I'm trying to run an ansible playbook and I end up with this error:

ERROR: sudo_pass is not a legal parameter at this level in an Ansible Playbook

My playbook:

---
- name: Server
  hosts: node1
  sudo_pass: ubuntu
  roles:
    - dbserver
Jan 29, 2019 in Ansible by Neel
1,168 views

1 answer to this question.

0 votes

Here sudo_pass is where you're going wrong. Ansible does not understand sudo_pass. Use sudo: yes instead of sudo_pass. This line will give a message saying sudo password is required to run the playbook and the password will be asked on the command line when you execute the playbook. Execute the playbook with -k flag, like this:

ansible-playbook -i hosts site.yml -K​
answered Jan 29, 2019 by Hatim

Related Questions In Ansible

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

Error saying "ERROR: ec2_vpc_subnet is not a legal parameter of an Ansible Play"

ec2_vpc_subnet is support from Ansible version 2.0 and ...READ MORE

answered Feb 8, 2019 in Ansible by Dee
1,028 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,952 views
+2 votes
1 answer
0 votes
2 answers
0 votes
1 answer

reboot all web servers in Canada, 15 at a time. is that possible in Ansible?

Of course, that is possible @Neel, just ...READ MORE

answered Mar 6, 2019 in Ansible by Yogesh
571 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP