Ansible: /etc not writable

Question:

I am trying to copy a file in to /etc. But I am getting “msg: Destination /etc not writable” when i run the playbook. Here is my Playbook task part. Really Appreciate your help.

tasks:

Error

msg: Destination /etc not writable

Note:I have provided the ssh and sudo pass while running the Playbook.

Answer:

Instead of using sudo with your tasks, try adding become: yes with your playbook

example

Also, make sure that you are really entering the sudo password instead of the user password.

Leave a Reply