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?
bryan@ubuntu:~/mine/cfg-backup$ ansible-playbook -vvv cfg-backup.yml
…
<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,
“msg”: “unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell”
}
fatal: [192.168.9.201]: FAILED! => {
“changed”: false,
“msg”: “unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell”
}
fatal: [192.168.9.203]: FAILED! => {
“changed”: false,
“msg”: “unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell”
}
Thanks,
Bryan