ansible-collections / cisco.nxos

Ansible Network Collection for Cisco NXOS
GNU General Public License v3.0
115 stars 109 forks source link

feat: epld upgrade with nxos #890

Open peio42 opened 2 weeks ago

peio42 commented 2 weeks ago
SUMMARY

Add an optional parameter "epld_image_file" to the cisco.nxos.nxos_install_os command. If the parameter is not specified (default), the upgrade behavior remains unchanged. If an EPLD file is provided, the installation command will be modified to include the EPLD update alongside the NXOS image update. The command used will then be "install all nxos <...> epld <...>".

Note: Updating the EPLDs results in a longer upgrade time. Be sure to adjust the ansible_command_timeout variable accordingly.

ISSUE TYPE
COMPONENT NAME

cisco.nxos

ADDITIONAL INFORMATION

Exemple variables

  target:
    nxos_ver: 10.2(8)
    image: nxos64-cs.10.2.8.M.bin
    image_md5: de8c8756f80c1cd4bae8597a23aec414
    epld: n9000-epld.10.2.6.M.img
    epld_md5: 32a456aecf481321df5b56b018d1c602

Exemple upgrade block

    - name: Install/Upgrade NXOS software
      block:
        - name: Installing Target NXOS {{ target['nxos_ver'] }}
          check_mode: false
          nxos_install_os:
            system_image_file: "{{ target['image'] }}"
            epld_image_file: "{{ target['epld'] }}"
            issu: no
          register: install_output
          vars:
            ansible_command_timeout: 900
            ansible_connect_timeout: 600

        - name: Show install results
          debug: var=install_output.install_state

      always:
        - name: Waiting for {{ inventory_hostname }} to come back up
          wait_for:
            host: "{{ (ansible_ssh_host|default(ansible_host))|default(inventory_hostname) }}"
            port: 22
            state: started
            timeout: 300
            delay: 60
peio42 commented 1 week ago

Hello, Is there anything I can do to help for this PR?