blob: 387b684b6f8eb1ab9ac4cad33c9e7855f1e774c9 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
---
- hosts: localhost
vars:
_workstation_user: qwd
basegroups_workstation_user: "{{_workstation_user }}"
doas_workstation_user: "{{ _workstation_user }}"
dockerd_workstation_user: "{{ _workstation_user }}"
dotfiles_workstation_user: "{{ _workstation_user }}"
libvirt_workstation_user: "{{ _workstation_user }}"
pipewire_workstation_user: "{{ _workstation_user }}"
shell_workstation_user: "{{ _workstation_user }}"
syncthing_workstation_user: "{{ _workstation_user }}"
yay_workstation_user: "{{ _workstation_user }}"
makepkg_user: "{{ _workstation_user }}"
pre_tasks:
- name: verify running as root
ansible.builtin.fail:
when: ansible_user_id != "root"
tags: always
- name: retrieve installed packages
ansible.builtin.package_facts:
register: package_facts
- name: include localhost variable
ansible.builtin.include_vars:
file: "host_vars/{{ ansible_hostname }}.yml"
roles:
- role: _workstation/basetools
when: ansible_distribution in ["Archlinux", "OpenBSD"]
- role: _workstation/basegroups
when: ansible_distribution in ["Archlinux"]
- role: _workstation/wscons
when: ansible_distribution in ["OpenBSD"]
- role: _workstation/shell
- role: _workstation/hosts
- role: _workstation/doas
- role: _workstation/yay
when:
- ansible_distribution in ["Archlinux"]
- "'yay' not in package_facts.ansible_facts.packages"
- "'yay-bin' not in package_facts.ansible_facts.packages"
- role: _workstation/xorg
when: ansible_distribution in ["Archlinux", "OpenBSD"]
- role: sshd
when: '"work" in ansible_hostname'
- role: _workstation/smartcard
when: ansible_distribution in ["Archlinux", "OpenBSD"]
- role: _workstation/pipewire
when: ansible_distribution in ["Archlinux"]
- role: _workstation/cronie
when: ansible_distribution in ["Archlinux"]
- role: _workstation/libvirt
when: ansible_distribution in ["Archlinux"]
- role: _workstation/dockerd
when: ansible_distribution in ["Archlinux"]
- role: _workstation/resolv
when: ansible_distribution in ["Archlinux"]
- role: _workstation/syncthing
when: ansible_distribution in ["Archlinux"]
- role: _workstation/tlp
when:
- ansible_distribution in ["Archlinux"]
- ansible_form_factor in ["Laptop", "Notebook"]
- role: _workstation/apm
when: ansible_distribution in ["OpenBSD"]
- role: _workstation/kernel
when: ansible_distribution in ["OpenBSD"]
- role: _workstation/dotfiles
become: true
become_user: "{{ dotfiles_workstation_user }}"
|