Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible: /etc not writable

Tags:

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.

like image 476
Nandu Avatar asked Apr 12 '16 07:04

Nandu


1 Answers

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.

like image 99
Lester Avatar answered Sep 19 '22 07:09

Lester