aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/sysconf/tasks/main.yml
blob: 0f615506cf585944e6b6d6c7f72ae274dc8f72b4 (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

# workstation ~~ roles/workstation/tasks/main.yml
# init workstation

---

- name: include distribution specific task
  include_tasks: "_{{ ansible_distribution | lower }}.yml"
  ignore_errors: true

- name: generate doas configuration
  lineinfile:
    path: /etc/doas.conf
    regexp: "^permit persist keepenv {{ _workstation_env_user }} as root"
    line: "permit persist keepenv {{ _workstation_env_user }} as root"
    owner: root
    mode: 0644
    create: true

- name: start and enable pcscd service
  service:
    name: pcscd
    state: started
    enabled: true

- name: check sudo binary path
  shell: which sudo
  register: result
  failed_when: result.rc | string not in "02"

- name: uninstall sudo binary
  package:
    name: sudo
    state: absent
  when: result.rc == 0
  register: sudo
  ignore_errors: true
remember that computers suck.