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:
- name: copy rsyslog sudo: yes copy: src: /home/nandakumar.nachimuth/playbooks/rhn_check/rtest.conf dest: /etc/rtest.conf owner: root group: root mode: 0755 ignore_errors: yes
Error
msg: Destination /etc not writable
Note:I have provided the ssh and sudo pass while running the Playbook.
Instead of using sudo
with your tasks, try adding become: yes
with your playbook
example
- hosts: all become: yes
Also, make sure that you are really entering the sudo
password instead of the user password.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With