I have a question about the net_put Module. I use this to upload .ios images to my cisco devices. For that, I use my MacBook with this configuration
configured module search path = ['/Users/alexander.dollny/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.9.10/libexec/lib/python3.8/site-packages/ansible
python version = 3.8.3 (default, Jul 8 2020, 14:27:55) [Clang 11.0.3 (clang-1103.0.32.62)]
Everything is working fine with this setup..
centos@ip-10-DEV]$ ansible-playbook -i hosts.ini ./1st/01_upload_image.yml -vvv
ansible-playbook 2.9.11
config file = /home/centos/repos/GitHub/ansible-ios/DEV/ansible.cfg
configured module search path = ['/home/centos/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/centos/.local/lib/python3.6/site-packages/ansible
executable location = /home/centos/.local/bin/ansible-playbook
python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/centos/repos/GitHub/ansible-ios/DEV/ansible.cfg as config file
host_list declined parsing /home/centos/repos/GitHub/ansible-ios/DEV/hosts.ini as it did not pass its verify_file() method
script declined parsing /home/centos/repos/GitHub/ansible-ios/DEV/hosts.ini as it did not pass its verify_file() method
auto declined parsing /home/centos/repos/GitHub/ansible-ios/DEV/hosts.ini as it did not pass its verify_file() method
yaml declined parsing /home/centos/repos/GitHub/ansible-ios/DEV/hosts.ini as it did not pass its verify_file() method
Parsed /home/centos/repos/GitHub/ansible-ios/DEV/hosts.ini inventory source with ini plugin
PLAYBOOK: 01_upload_image.yml **********************************************************************************************************************************************************************************************************
1 plays in ./1st/01_upload_image.yml
PLAY [upgrade ios switches] ************************************************************************************************************************************************************************************************************
META: ran handlers
TASK [image upload] ********************************************************************************************************************************************************************************************************************
task path: /home/centos/repos/GitHub/ansible-ios/DEV/1st/01_upload_image.yml:14
The full traceback is:
Traceback (most recent call last):
File "/home/centos/.local/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 147, in run
res = self._execute()
File "/home/centos/.local/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 660, in _execute
result = self._handler.run(task_vars=variables)
File "/home/centos/.local/lib/python3.6/site-packages/ansible/plugins/action/net_put.py", line 131, in run
result['changed'] = changed
UnboundLocalError: local variable 'changed' referenced before assignment
fatal: [sw4cell.iscout.mgmt]: FAILED! => {}
MSG:
Unexpected failure during module execution.
PLAY RECAP *****************************************************************************************************************************************************************************************************************************
sw4cell : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0