From c17fccec08689065c8f4f902544e984521c7437b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 22 Apr 2024 19:53:43 +0200 Subject: revamp: user/group handling --- roles/core/users/tasks/OpenBSD.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 roles/core/users/tasks/OpenBSD.yml (limited to 'roles/core/users/tasks/OpenBSD.yml') diff --git a/roles/core/users/tasks/OpenBSD.yml b/roles/core/users/tasks/OpenBSD.yml new file mode 100644 index 00000000..d04d3d7a --- /dev/null +++ b/roles/core/users/tasks/OpenBSD.yml @@ -0,0 +1,14 @@ +--- +- name: install sudo + when: (admin_users | length) > 0 + openbsd_pkg: + name: sudo-- + state: present + +- name: allow wheel group to use sudo + when: (admin_users | length) > 0 + lineinfile: + regexp: '^#?\s*%wheel(\s+)ALL=\(ALL\) SETENV: ALL$' + line: '%wheel\1ALL=(ALL) SETENV: ALL' + backrefs: yes + dest: /etc/sudoers -- cgit v1.2.3