summaryrefslogtreecommitdiff
path: root/roles/scaleway-dkms/tasks/main.yml
blob: 5dda15f6d2354b0a17be388c4d4dc1efd1de4867 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
- name: install build deps
  with_items:
  - build-essential
  - libssl-dev
  apt:
    name: "{{ item }}"
    state: present

- name: install (sadly missing) script to fetch kernel sources
  copy:
    src: my_scw-fetch-kernel-sources
    dest: /usr/local/sbin/
    mode: 0755
  notify: fetch kernel sources

- name: check if sources are already initialized
  stat:
    path: "/lib/modules/{{ ansible_kernel }}/build"
    follow: yes
  register: build_directory
  changed_when: build_directory.stat.exists == False
  notify: fetch kernel sources

- name: fetch kernel sources
  meta: flush_handlers