/ansible_role_hp_linux_tools

mirror of https://gitlab.com/gcoop-libre/ansible_role_hp_linux_tools

Primary LanguageMakefileGNU General Public License v3.0GPL-3.0

Ansible Role: gcoop-libre.hp_linux_tools

This role, download, build, install a HP Linux Tools (hpuefi-mod kernel module) and execute hp-repsetup to get and set BIOS configuration from file (HPSETUP.TXT).

Tag Summay

date tag description
2023-12-15 v0.2.5 add support for multiple versions of HP Linux Tools (currently versions 3.21 and 3.22), improve network interface and PCI device ID detection and better validations, and include test results from HP G5 and G6
2023-12-11 v0.2.4 add support for config options with/without BIOS Admin Password, add tasks to reset/update BIOS Admin Password, by default download HPSETUP-ASPM-DISABLE.TXT to disable PCI Express Power Management
2023-10-06 v0.2.3 add wol-wait-lspci playbook for WakeOnLAN, wait for SSH and verify lspci output, add wol-wait-system-info playbook for WakeOnLAN, wait for SSH and get and show System Info, improve README, ansible-lint and gitlab-ci
2023-09-29 v0.2.2 add wol-wait-install playbook for WakeOnLAN, wait for SSH and install HP Linux Tools only when match with system_vendor
2022-08-10 v0.2.1 add dmi-validate playbook for test and ignore fail on invalid (bios_date
2022-03-30 v0.2.0 Release v0.2.0
2022-03-17 v0.1.1 add symbolic link to role in tests
2021-12-30 v0.1.0 first version tested in Ubuntu Bionic

Requirements

None.

Role Variables

Available variables with default values in defaults/main/*.yml.

Dependencies

All dependencies are downloaded, installed and configured by this role.

Example Playbook

If you want to get BIOS configuration:

---

- name: install hp_linux_tools
  hosts: [all]

  roles:
    - role: gcoop-libre.hp_linux_tools

If you want to download HPSETUP.TXT and set BIOS configuration:

---

- name: Install HP Linux Tools and disable ASPM in BIOS
  hosts: [all]

  roles:
    - role: gcoop-libre.hp_linux_tools
      hplt_reboot_and_wait: True
      hplt_repsetup_hpsetup_down: True
      hplt_repsetup_hpsetup_file_checksum: e7790575d4646c00b38a57d15f59d73b377c99e706f91bd18d712ba55f3915dc
      hplt_repsetup_hpsetup_file_host: https://osiux.com/
      hplt_repsetup_hpsetup_file_name: HPSETUP-ASPM-DISABLE.TXT
      hplt_repsetup_hpsetup_get: False

Playbooks

playbook description
tests/dmi-validate.yml Validate DMI (Desktop Management Interface)
tests/test.yml Install HP Linux Tools
tests/wol-wait-install.yml WoL host, wait for Online and install HP Linux Tools
tests/wol-wait-lspci.yml WoL host, wait for Online and verify lspci output
tests/wol-wait-system-info.yml WoL host, wait for Online and show System Info

Hardware Tested

bios_date bios_version product_name network
12/23/2019 R23 Ver. 02.04.01 HP ProDesk 400 G5 Desktop Mini Realtek RTL8111/8168/8411 (rev 15)
04/27/2020 R23 Ver. 02.05.01 HP ProDesk 400 G5 Desktop Mini Realtek RTL8111/8168/8411 (rev 15)
11/04/2021 S23 Ver. 02.09.02 HP ProDesk 400 G6 Desktop Mini PC Intel Corporation Ethernet Connection (11) I219-LM

HP Linux Tools suppported versions

The HP Flash and Replicated Setup Utilities for Linux are a free set of utilities which provide the ability to manage BIOS settings and update BIOS firmware on HP supported desktop, Workstation and notebook computers.

version date status file
v3.22 2022-10-17 TESTED sp143035.tgz
v3.21 2020-07-08 TESTED sp111455.tgz

Results of running hp-repsetup

The possible results of running hp-repsetup with different combinations of parameters are detailed below:

action current new rc result message
reset password VALID / 0 SUCCESS Admin password updated successfully.
reset password INVALID / 136 FAILED Admin password was not updated: (Access Denied)
reset password RESET / 136 FAILED Admin password was not updated: (Invalid Parameter)
update password VALID SAME 0 SUCCESS Admin password updated successfully.
update password INVALID NEW 136 FAILED Admin password was not updated: (Access Denied)
update password RESET NEW 136 FAILED Admin password was not updated: (Security Violation)
update password VALID `SHORT 136 FAILED Admin password was not updated: (Security Violation)
update password NEW NEW 0 SUCCESS Admin password updated successfully.
set options VALID - 0 SUCCESS All BIOS options programmed successfully:
set options INVALID - 135 FAILED (Access Denied)
set options RESET - 0 SUCCESS All BIOS options programmed successfully:
get options RESET - 0 SUCCESS Wrote 19504 bytes to HPSETUP.TXT
get options INVALID - 0 SUCCESS Wrote 19688 bytes to HPSETUP.TXT
get options VALID - 0 SUCCESS Wrote 19688 bytes to HPSETUP.TXT
  • VALID the password match with the current in BIOS

  • INVALID the password not match with the current in BIOS

  • RESET actually, the BIOS has not have password

  • SAME the password match with the current password provided

  • NEW the password is a new password (distinct to current password)

  • SHORT password has fewer minimum length characters

ASPM

Depending on the HP model and the network card model, the lspci output reports the enabled or disabled status of ASPM in different ways:

krnl_mod enabled disabled product_name ethernet_controller
r8169 LnkCtl: ASPM L1 Enabled; LnkCtl: ASPM Disabled; HP ProDesk 400 G5 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
e1000e - - HP ProDesk 400 G6 Intel Corporation Ethernet Connection (11) I219-LM

References

License

GNU General Public License, GPLv3.

Author Information

This role was created in 2021 by Osiris Alejandro Gomez, worker cooperative of gcoop Cooperativa de Software Libre.