aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/tasks/kernel.yml
blob: db4e5d2cc2516dcd919bb029965e8646b2557b9f (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- name: Make sure /boot/<machine-id> exists
  file:
    path: '/boot/{{ ansible_machine_id }}'
    state: directory
    owner: root
    group: root
    mode: 0755

- name: Make sure /etc/kernel/install.d exists
  file:
    path: '{{ item }}'
    state: directory
    owner: root
    group: root
    mode: 0755
  with_items:
  - '/etc/kernel'
  - '/etc/kernel/install.d'

- name: Mask grub and grubby
  file:
    path: '/etc/kernel/install.d/{{ item }}'
    src: '/dev/null'
    state: link
    force: yes
  with_items:
  - 20-grub.install
  - 20-grubby.install

- name: Create syslinux loader entry and menu
  copy:
    dest: '/etc/kernel/install.d/'
    src: '{{ item }}'
    owner: root
    group: root
    mode: 0755
  with_fileglob: 'kernel/*.install'
  loop_control:
    label: '/etc/kernel/install.d/{{ item|basename }}'

- name: Set kernel command line
  template:
    dest: '/etc/kernel/cmdline'
    src: cmdline.j2
    owner: root
    group: root
    mode: 0644

- name: Install kernel
  dnf:
    name: kernel
    state: present
  tags:
  - packages

# vim: set ts=2 sw=2 et: