Skip to content

Commit

Permalink
fix(lint): fix lint errors for Pensando and Marvell FWs in Firmware.yml
Browse files Browse the repository at this point in the history
Signed-off-by: sakethanne <[email protected]>
  • Loading branch information
Sakethanne committed Sep 2, 2024
1 parent 97bdc82 commit 24f3b59
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 18 deletions.
4 changes: 2 additions & 2 deletions ansible/f5certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
f5networks.f5_modules.bigip_ssl_certificate:
provider: "{{ provider }}"
name: "{{ cert_list_name }}"
content: "{{ lookup('file', ssl_cert_location ) }}"
content: "{{ lookup('file', ssl_cert_location) }}"
delegate_to: localhost

- name: Upload New SSL key upload
f5networks.f5_modules.bigip_ssl_key:
provider: "{{ provider }}"
name: "{{ cert_list_name }}"
content: "{{ lookup('file', ssl_key_location ) }}"
content: "{{ lookup('file', ssl_key_location) }}"
delegate_to: localhost
60 changes: 44 additions & 16 deletions ansible/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,35 @@
# from https://www.kernel.org/doc/html/v5.8/networking/device_drivers/pensando/ionic.html
- name: Pensando DSC installation-update
hosts: dh1
become: yes
become: true
tasks:
- ansible.builtin.shell: lspci -d 1dd8:1002
- ansible.builtin.shell: lspci | grep Pensando
- ansible.builtin.shell: dmesg | grep ionic
- ansible.builtin.shell: ls -l /sys/class/net/*/device
- ansible.builtin.shell: ls -l /sys/class/net/*/device/driver
- ansible.builtin.shell: ethtool -i enp25s0np0
- ansible.builtin.shell: devlink dev info pci/0000:19:00.0
- name: Check for Pensando device in PCI list
ansible.builtin.command: lspci -d 1dd8:1002
changed_when: false

- name: Grep for Pensando devices list
ansible.builtin.command: lspci | grep Pensando
changed_when: false

- name: Check for Pensando device in kernel messages
ansible.builtin.command: dmesg | grep ionic
changed_when: false

- name: Check for Pensando device in network devices1
ansible.builtin.command: ls -l /sys/class/net/*/device
changed_when: false

- name: Check for Pensando device in network devices2
ansible.builtin.command: ls -l /sys/class/net/*/device/driver
changed_when: false

- name: Fetch network device driver details1
ansible.builtin.command: ethtool -i enp25s0np0
changed_when: false

- name: Fetch network device driver details2
ansible.builtin.command: devlink dev info pci/0000:19:00.0
changed_when: false

# TODO: update FW for Pensando DSC
- name: Update Pensando DSC Firmware
Expand All @@ -252,17 +272,25 @@
when: not pensando_firmware_check.stat.exists

- name: Install Pensando DSC Firmware
ansible.builtin.shell: |
fw-update --device /dev/ionic0 --fw /path/to/pensando_firmware.bin
ansible.builtin.command: fw-update --device /dev/ionic0 --fw /path/to/pensando_firmware.bin
changed_when: false
when: pensando_firmware_check.stat.exists

- name: Marvell CN106 installation-update
hosts: dh3
become: yes
become: true
tasks:
- ansible.builtin.shell: lspci | grep Cavium
- ansible.builtin.shell: lsusb | grep CP2105
- ansible.builtin.shell: ls -l /dev/ttyUSB*
- name: Check for Marvell device in PCI list
ansible.builtin.command: lspci | grep Cavium
changed_when: false

- name: Check for Marvell device in USB list
ansible.builtin.command: ls -l /dev/ttyUSB*
changed_when: false

- name: Check for Marvell device in PCI list2
ansible.builtin.command: lsusb | grep CP2105
changed_when: false

# TODO: update FW for Marvell CN106
- name: Update Marvell CN106 Firmware
Expand All @@ -280,6 +308,6 @@
when: not marvell_firmware_check.stat.exists

- name: Install Marvell CN106 Firmware
ansible.builtin.shell: |
fwupdate -a /dev/cn106 -f /path/to/marvell_cn106_firmware.bin
ansible.builtin.command: fwupdate -a /dev/cn106 -f /path/to/marvell_cn106_firmware.bin
changed_when: false
when: marvell_firmware_check.stat.exists

0 comments on commit 24f3b59

Please sign in to comment.