diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-04-25 01:13:55 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-04-25 01:13:55 +0200 |
| commit | 43713d18273da0ec550f28bf697903dc6cec72cc (patch) | |
| tree | 7732ae1f8b320a4848e9694904f7f040290c9460 /roles | |
| parent | b7095cb5da0ce3381c2b2e4f8681df200ad1b16c (diff) | |
Fix linux headers role on different OSs
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/linux_headers/tasks/main.yml | 5 | ||||
| -rw-r--r-- | roles/linux_headers/vars/archlinux.yml | 2 | ||||
| -rw-r--r-- | roles/linux_headers/vars/debian.yml | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/roles/linux_headers/tasks/main.yml b/roles/linux_headers/tasks/main.yml index 454e4af8..76b23e8b 100644 --- a/roles/linux_headers/tasks/main.yml +++ b/roles/linux_headers/tasks/main.yml @@ -1,6 +1,9 @@ --- +- name: "Include OS-specific variables" + ansible.builtin.include_vars: "{{ ansible_facts['os_family'] | lower }}.yml" + - name: "Ensure linux-headers is installed" become: true ansible.builtin.package: - name: "linux-headers" + name: "{{ linux_headers_pkg }}" state: "present" diff --git a/roles/linux_headers/vars/archlinux.yml b/roles/linux_headers/vars/archlinux.yml new file mode 100644 index 00000000..227fbb17 --- /dev/null +++ b/roles/linux_headers/vars/archlinux.yml @@ -0,0 +1,2 @@ +--- +linux_headers_pkg: "linux-headers" diff --git a/roles/linux_headers/vars/debian.yml b/roles/linux_headers/vars/debian.yml new file mode 100644 index 00000000..d3e3e625 --- /dev/null +++ b/roles/linux_headers/vars/debian.yml @@ -0,0 +1,2 @@ +--- +linux_headers_pkg: "linux-headers-{{ ansible_kernel }}" |
