Permission denied while running the playbook

0 votes

I'm trying to run a playbook using this command

ansible-playbook lamp.yml

I get this:

PLAY [host1] *******************************************************************


TASK [Gathering Facts] *********************************************************

ok: [host1]


TASK [Add ppa Repository] ******************************************************

fatal: [host1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to host1 closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}

 [WARNING]: Could not create retry file '/etc/ansible/lamp.retry'.

[Errno 13] Permission denied: u'/etc/ansible/lamp.retry'
Feb 9, 2019 in Ansible by Hari
4,044 views

1 answer to this question.

0 votes
Hey @Hari, try executing your playbook using this command:

ansible-playbook lamp.yml -K

Add a flag -K which will ask you for sudo password and then continue.
answered Feb 9, 2019 by Monish

Related Questions In Ansible

0 votes
1 answer

Error saying permission denied while running ansible playbook

Hey @Neha, add the following line to ...READ MORE

answered Feb 8, 2019 in Ansible by Amy
15,922 views
0 votes
1 answer

Permission denied when running ansible playbook through jenkins

Jenkins uses it's own user to execute ...READ MORE

answered Jun 25, 2018 in Ansible by DareDev
• 6,890 points
4,165 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
4,062 views
+2 votes
1 answer
0 votes
1 answer
+1 vote
3 answers
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