I have a playbook that backups router configs using the ios_config module. When I run the command as sudo it works but the files it creates are owned by root. I want them owned by me. However when I run the ansible-playbook command without sudo it fails and gives the errors below. Any ideas what I need to change to get this to work?
...
<192.168.9.201> using connection plugin network_cli
<192.168.9.202> using connection plugin network_cli
<192.168.9.203> using connection plugin network_cli
fatal: [192.168.9.202]: FAILED! => {
"changed": false,
}
fatal: [192.168.9.201]: FAILED! => {
"changed": false,
}
fatal: [192.168.9.203]: FAILED! => {
"changed": false,
}