aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/common/tasks/main.yaml
blob: ec27dfeb413b5a8bcb56e5c09735119635d7d62a (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
46
47
48
49
50
51
52
53
54
---
# file: tasks/main.yaml

- name: Update Repositories Cache
  ansible.builtin.apt:
    update_cache: true
  when:
    - ansible_os_family == 'Debian'
  tags:
    - common-inst-prerequisites

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

- name: PIP management
  ansible.builtin.file:
    path: "/usr/lib/python3.12/EXTERNALLY-MANAGED"
    state: "absent"
  tags:
    - common-inst-pip

- name: Meson (DPDK)
  ansible.builtin.pip:
    name:
      - "meson==0.64.1"
    state: "forcereinstall"
  environment:
    ANSIBLE_SKIP_CONFLICT_CHECK: 1
  tags:
    - common-inst-pip

- name: sudoers admin
  ansible.builtin.lineinfile:
    path: "/etc/sudoers"
    state: "present"
    regexp: "^%admin ALL="
    line: "%admin ALL=(ALL) ALL"
    validate: "/usr/sbin/visudo -cf %s"
  tags:
    - common-conf-sudoers

- name: sudoers nopasswd
  ansible.builtin.lineinfile:
    path: "/etc/sudoers"
    state: "present"
    regexp: "^%sudo"
    line: "%sudo ALL=(ALL:ALL) NOPASSWD: ALL"
    validate: "/usr/sbin/visudo -cf %s"
  tags:
    - common-conf-sudoers