summaryrefslogtreecommitdiff
path: root/roles/core/users/tasks/OpenBSD.yml
blob: d04d3d7ad1517466ad3518f8b5cd940e61e87be8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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