I have an existing playbook that suddenly seems to be having an odd problem I cant identify.
There are a series of API calls to our password manager, then setting specific facts based on those calls. Finally I get to this command.
- name: Backup configuration from switch stacks....
cisco.ios.ios_config:
backup: true
backup_options:
filename: "{{ file_string }}.txt"
dir_path: "/home/user_account/backups/{{ inventory_hostname }}"
Which gives me a super odd verbose output of:
The full traceback is:
File "/home/user_account/.local/lib/python3.10/site-packages/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py", line 60, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File "/home/user_account/.local/lib/python3.10/site-packages/ansible/module_utils/connection.py", line 193, in __rpc__
response = self._exec_jsonrpc(name, *args, **kwargs)
File "/home/user_account/.local/lib/python3.10/site-packages/ansible/module_utils/connection.py", line 140, in _exec_jsonrpc
raise ConnectionError(
fatal: [hostname]: FAILED! => changed=false
invocation:
module_args:
after: null
backup: true
backup_options:
dir_path: /home/user_account/backups/hostname
filename: hostname_20240822T195858.txt
before: null
defaults: false
diff_against: null
diff_ignore_lines: null
intended_config: null
lines: null
match: line
multiline_delimiter: '@'
parents: null
replace: line
running_config: null
save_when: never
src: null
msg: socket path /home/user_account/.ansible/pc/e1b79382e1 does not exist or cannot be found. See Troubleshooting socket path issues in the Network Debug and Troubleshooting Guide
...for each host that the play is running against. I found a couple suggestions that didn't make much sense. The first being to use LibSSH, but I have found a ton of problems when not using Paramiko, and am hesitant to change back. The second being to downgrade to Ansible 2.14 due to some unspecified "issues" with .15-.17.
This seems super odd to me as the path the error is providing seems to be a fake or temporary path for something Ansible is doing in the background which leaves me very little to work with.
I am currently running Ansible core 2.17.0, with Python 3.10.12, on Ubuntu 22.04.
~/.ansible/pcfor all network devices.See Troubleshooting socket path issues in the Network Debug and Troubleshooting Guide