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
250 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 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,810 points
618 views
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
124 views
0 votes
1 answer
0 votes
1 answer
0 votes
3 answers