aboutsummaryrefslogtreecommitdiffstats
path: root/roles/workstation/tasks/doas.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-12-10 21:17:16 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-12-12 22:04:27 +0100
commit7c1f7039170a25f192d87235476179f7cfe01a85 (patch)
treefc8e77b7176fa730b30b20081e76f2527371e9a3 /roles/workstation/tasks/doas.yml
parent21fc0867dc42128434e5c46ca684d9a966184b8a (diff)
downloadrules-7c1f7039170a25f192d87235476179f7cfe01a85.tar.gz
chore: explode workstation role in subroles
Diffstat (limited to 'roles/workstation/tasks/doas.yml')
-rw-r--r--roles/workstation/tasks/doas.yml34
1 files changed, 0 insertions, 34 deletions
diff --git a/roles/workstation/tasks/doas.yml b/roles/workstation/tasks/doas.yml
deleted file mode 100644
index e47fa35..0000000
--- a/roles/workstation/tasks/doas.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-- name: generate doas configuration
- ansible.builtin.lineinfile:
- path: /etc/doas.conf
- regexp: "^permit persist keepenv {{ workstation_user }} as root"
- line: "permit persist keepenv {{ workstation_user }} as root"
- create: true
- mode: 0644
- owner: 0
- group: 0
-
-- name: allow reboot/shutdown/hibernate with doas
- ansible.builtin.lineinfile:
- path: /etc/doas.conf
- regexp: "^permit nopass {{ workstation_user }} as root cmd {{ item }}"
- line: "permit nopass {{ workstation_user }} as root cmd {{ item }}"
- loop:
- - ZZZ
- - mount
- - reboot
- - shutdown
- - zzz
-
-- name: check sudo binary path # noqa no-changed-when
- ansible.builtin.command: command -v sudo
- register: result
- failed_when: false
-
-- name: uninstall sudo binary
- ansible.builtin.package:
- name: sudo
- state: absent
- when: result.rc == 0
- register: sudo
- ignore_errors: true
remember that computers suck.