aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/calibration/tasks/main.yaml
blob: 9db95a87a0a262b77c42f6ba19a7f7bfe0b182a0 (plain)
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
---
# file: tasks/main.yaml

- name: Update Package Cache (APT)
  ansible.builtin.apt:
    update_cache: true
    cache_valid_time: 3600
  when:
    - ansible_distribution|lower == 'ubuntu'
  tags:
    - calibration-inst-prerequisites

- name: Prerequisites
  ansible.builtin.package:
    name: "{{ packages | flatten(levels=1) }}"
    state: latest
  tags:
    - calibration-inst-prerequisites

- name: Check Kernel Parameters
  ansible.builtin.assert:
    that:
      - item in ansible_cmdline
    fail_msg: "Kernel parameters!"
    success_msg: "Kernel parameters match."
  loop: "{{ grub.keys()|sort }}"
  when:
    - grub is defined
  tags:
    - check-kernel-params

- name: Check Kernel Version
  ansible.builtin.assert:
    that:
      - ansible_kernel not in kernel_version_by_distro_by_arch
    fail_msg: "Kernel version!"
    success_msg: "Kernel version match."
  tags:
    - check-kernel-version

- name: "{{ ansible_machine }} Specific"
  include_tasks: "{{ ansible_machine }}.yaml"
  tags:
    - check-machine-specific
    - check-jitter-tool