summaryrefslogtreecommitdiff
path: root/roles/prepare-dkms/tasks/scaleway.yml
blob: 82795e85210657222fe3db4ca345762f29ef02b4 (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
27
28
29
---
- name: install build deps and dkms
  apt:
    name:
    - build-essential
    - libssl-dev
    - dkms
    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 scaleway kernel sources

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

- name: fetch kernel sources
  meta: flush_handlers