1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_amdgpu_firmware.git synced 2024-08-16 14:59:49 +02:00

initial write role

This commit is contained in:
L3D 2021-09-01 02:39:22 +02:00
parent f4677678d9
commit 0a889fd362
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 53 additions and 3 deletions

View file

@ -1,3 +1,30 @@
---
# define download url prefix
rtl_nic__download_prefix: 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain'
# define firmware list
rtl_nic__firmware:
- 'rtl_nic/rtl8107e-2.fw'
- 'rtl_nic/rtl8107e-1.fw'
- 'rtl_nic/rtl8168h-2.fw'
- 'rtl_nic/rtl8168h-1.fw'
- 'rtl_nic/rtl8168g-3.fw'
- 'rtl_nic/rtl8168g-2.fw'
- 'rtl_nic/rtl8106e-2.fw'
- 'rtl_nic/rtl8106e-1.fw'
- 'rtl_nic/rtl8411-2.fw'
- 'rtl_nic/rtl8411-1.fw'
- 'rtl_nic/rtl8402-1.fw'
- 'rtl_nic/rtl8168f-2.fw'
- 'rtl_nic/rtl8168f-1.fw'
- 'rtl_nic/rtl8105e-1.fw'
- 'rtl_nic/rtl8168e-3.fw'
- 'rtl_nic/rtl8168e-2.fw'
- 'rtl_nic/rtl8168e-1.fw'
- 'rtl_nic/rtl8168d-2.fw'
- 'rtl_nic/rtl8168d-1.fw'
rtl_nic__path: '/lib/firmware'
# should we do a version check? (recomended)
submodules_versioncheck: false

7
handlers/main.yml Normal file
View file

@ -0,0 +1,7 @@
---
- name: update initramfs
become: true
listen: update initrd
ansible.builtin.command:
cmd: >
update-initramfs -k all -u

View file

@ -0,0 +1,11 @@
---
- name: download rtl_nic firmware
become: true
ansible.builtin.get_url:
url: "{{ rtl_nic__download_prefix }}/{{ item }}"
dest: "{{ rtl_nic__path }}/{{ item }}"
owner: root
group: root
mode: 0644
with_items: "{{ rtl_nic__firmware }}"
notify: update initrd

View file

@ -1,3 +1,8 @@
---
- include_tasks: versioncheck.yml
- ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- ansible.builtin.include_tasks: kernel_firmware_download.yml
when:
- ansible_board_name == 'APU'
- ansible_product_name == 'APU'

View file

@ -1,4 +1,4 @@
---
# versionscheck
playbook_version_number: 02 # should be a integer
playbook_version_path: 'role-<some_unique_string>.version'
playbook_version_number: 3
playbook_version_path: 'do1jlr.rtl_nic_firmware.version'