cancel
Showing results for 
Search instead for 
Did you mean: 
Mawuena
Flight Engineer
Flight Engineer
  • 546 Views

ansible could not create a file on managed host

Jump to solution

Hello,

After executing #ansible-playbook example.yml to configure yum epository on managed nodes, the facts gathering was ok. However, the following errors appear: 

fatal: nodex failed ... changed false ....Error number 13 permission denied: /etc/yum.repos.d/app.repo ... problems handling file /etc/yum.repos.d /app.repo

Please, help me resolve.

Regards

Labels (1)
1 Solution

Accepted Solutions
IanL
Mission Specialist
Mission Specialist
  • 525 Views

Hello Mawuena,

Can you post your playbook? My first guess is that you aren't elevating your user permissions. Does your play have become: true in it?  

View solution in original post

2 Replies
IanL
Mission Specialist
Mission Specialist
  • 526 Views

Hello Mawuena,

Can you post your playbook? My first guess is that you aren't elevating your user permissions. Does your play have become: true in it?  

Mawuena
Flight Engineer
Flight Engineer
  • 503 Views

Thanks so much, lanL!

I inserted in the playbook as you suggested:

become: true

Also to /etc/sudoers of each managed hosts:

username ALL=(ALL) NOPASSWD: ALL

Everything is okay now.

Join the discussion
You must log in to join this conversation.