Closed JSTBotanic closed 1 year ago
Hi @JSTBotanic please ensure you're using the collection by including the collection in the playbook, you'll want to change your playbook to the following:
- hosts: Switch1
collections:
- arubanetworks.aoscx
tasks:
- name: image upload
aoscx_upload_firmware:
partition_name: 'secondary'
firmware_file_path: '/root/aruba_switchs/firmwares/ArubaOS-CX_6100-6000_10_10_1020.swi'
Also please ensure you have the latest PYAOSCX package as well as the collection by using the following installation commands:
ansible-galaxy collection install arubanetworks.aoscx -f
python3 -m pip install --upgrade --force-reinstall pyaoscx
Please respond if the error persists or if you receive another error. When you respond please include what firmware is currently on the switch, and you stated it's a 6100 correct?
Hi @tchiapuziowong
Thanks for your reply.
I made the changes but now I have a new error message :
`ansible-playbook 2.10.8 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] No config file found; using defaults host_list declined parsing /root/aruba_switchs/inventory/inventory_rest_api.yml as it did not pass its verify_file() method script declined parsing /root/aruba_switchs/inventory/inventory_rest_api.yml as it did not pass its verify_file() method Parsed /root/aruba_switchs/inventory/inventory_rest_api.yml inventory source with yaml plugin Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: playbook_upload_firmware.yml ***** 1 plays in playbook_upload_firmware.yml
PLAY [Switch1] *****
TASK [Gathering Facts] *****
task path: /root/aruba_switchs/playbook/playbook_upload_firmware.yml:1
<192.168.99.10> ESTABLISH LOCAL CONNECTION FOR USER: root
<192.168.99.10> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-local-155547e23_d3y
"&& mkdir "echo /root/.ansible/tmp/ansible-local-155547e23_d3y/ansible-tmp-1672816208.2956982-15557-121463636183353
" && echo ansible-tmp-1672816208.2956982-15557-121463636183353="echo /root/.ansible/tmp/ansible-local-155547e23_d3y/ansible-tmp-1672816208.2956982-15557-121463636183353
" ) && sleep 0'
What your playbook ?
Hi @alagoutte
My playbook :
And my inventory is on the first comment.
Thank you.
Hi @alagoutte
My playbook :
* hosts: Switch1 collections: * arubanetworks.aoscx tasks: * name: image upload aoscx_upload_firmware: partition_name: 'secondary' firmware_file_path: '/root/aruba_switchs/firmwares/ArubaOS-CX_6100-6000_10_10_1020.swi'
And my inventory is on the first comment.
Thank you.
Why do you are using role and not collection ?
Hi @alagoutte,
@tchiapuziowong told me to switch role by collection in the second comment.
Hi @JSTBotanic I believe this is due to a known issue with the 6100 that the development team is still working on resolving issue28 - this is due in part to how the python library we're using to upload the file is sending to the switch, we're working on a fix and will update both these issues once a fix has been uploaded
Hi @tchiapuziowong have you got date for the release ?
@tchiapuziowong @alagoutte Any updates ?
We're working on finalizing testing and are looking to publish a new release soon including this fix - thank you for your continued patience and we'll update the issue once it's been published.
We're still finalizing some fixes and are planning to publish new version next week - thank you again for your continued patience!
Hi @tchiapuziowong the fixes are publish ?
We've just uploaded a new version of the collection that addresses this issue- please ensure to install the latest version of the collection, pyaoscx, and pycurl with the following commands:
pip install pycurl
pip install pyaoscx --upgrade
ansible-galaxy collection install arubanetworks.aoscx -f
Hi,
II try to update the firmware of an Aruba 6100 switch but without success.
Here is my inventory: all: hosts: Switch1: ansible_host: 192.168.99.10 ansible_user: admin ansible_password: admin ansible_network_os: arubanetworks.aoscx.aoscx ansible_connection: arubanetworks.aoscx.aoscx # REST API Connection ansible_httpapi_validate_certs: False ansible_httpapi_use_ssl: True ansible_acx_no_proxy: True
Here is my playbook :
When I run my script, here are the errors returned to me :
`ansible-playbook playbook_upload_firmware.yml -i /root/aruba_switchs/inventory/inventory_rest_api.yml -vvv ansible-playbook 2.10.8 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] No config file found; using defaults host_list declined parsing /root/aruba_switchs/inventory/inventory_rest_api.yml as it did not pass its verify_file() method script declined parsing /root/aruba_switchs/inventory/inventory_rest_api.yml as it did not pass its verify_file() method Parsed /root/aruba_switchs/inventory/inventory_rest_api.yml inventory source with yaml plugin Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: playbook_upload_firmware.yml *** 1 plays in playbook_upload_firmware.yml
PLAY [Switch1] ***
TASK [Gathering Facts] *** task path: /root/aruba_switchs/playbook/playbook_upload_firmware.yml:1 <192.168.99.10> ESTABLISH LOCAL CONNECTION FOR USER: root <192.168.99.10> EXEC /bin/sh -c '( umask 77 && mkdir -p "
echo /root/.ansible/tmp/ansible-local-139632kgem88b
"&& mkdir "echo /root/.ansible/tmp/ansible-local-139632kgem88b/ansible-tmp-1672738815.3962035-13966-258570738346260
" && echo ansible-tmp-1672738815.3962035-13966-258570738346260="echo /root/.ansible/tmp/ansible-local-139632kgem88b/ansible-tmp-1672738815.3962035-13966-258570738346260
" ) && sleep 0'