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 in Ansible by Hari

1 answer 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 @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 by Monish

Related Questions In Ansible

0 votes
1 answer
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,520 points
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
3 answers

© 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.