mirror of
https://github.com/roles-ansible/ansible_role_rtl_nic_firmware.git
synced 2024-08-16 13:39:50 +02:00
initial write role
This commit is contained in:
parent
f4677678d9
commit
0a889fd362
6 changed files with 53 additions and 3 deletions
|
@ -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)
|
# should we do a version check? (recomended)
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
7
handlers/main.yml
Normal file
7
handlers/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: update initramfs
|
||||||
|
become: true
|
||||||
|
listen: update initrd
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: >
|
||||||
|
update-initramfs -k all -u
|
11
tasks/kernel_firmware_download.yml
Normal file
11
tasks/kernel_firmware_download.yml
Normal 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
|
|
@ -1,3 +1,8 @@
|
||||||
---
|
---
|
||||||
- include_tasks: versioncheck.yml
|
- ansible.builtin.include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
|
- ansible.builtin.include_tasks: kernel_firmware_download.yml
|
||||||
|
when:
|
||||||
|
- ansible_board_name == 'APU'
|
||||||
|
- ansible_product_name == 'APU'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
# versionscheck
|
# versionscheck
|
||||||
playbook_version_number: 02 # should be a integer
|
playbook_version_number: 3
|
||||||
playbook_version_path: 'role-<some_unique_string>.version'
|
playbook_version_path: 'do1jlr.rtl_nic_firmware.version'
|
||||||
|
|
Loading…
Reference in a new issue