Skip to content
Snippets Groups Projects
Commit bf7bb438 authored by nimrod's avatar nimrod
Browse files

- Cleaner OpenBSD package installation.

parent 13e78d87
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,6 @@
- users_use_sudo in [ True, False ]
- users_prune in [ True, False ]
# OpenBSD 5.7 was the last version that came with sudo installed.
- >
ansible_os_family != 'OpenBSD' or
ansible_distribution_version|version_compare('5.7', '<=') or
ansible_distribution_version in users_sudo_pkg or
not users_use_sudo
- include: sudo.yml
when: users_use_sudo
......
......@@ -11,7 +11,7 @@
- name: pkg install sudo
when: ansible_pkg_mgr == 'openbsd_pkg' and ansible_distribution_version|version_compare('5.7', '>')
openbsd_pkg:
name: '{{ users_sudo_pkg[ansible_distribution_version] }}'
name: sudo%1.8
state: present
- name: Create sudoers.d directory
......
......@@ -8,11 +8,6 @@ aliases_file:
OpenBSD: /etc/mail/aliases
Debian: /etc/aliases
users_sudo_pkg:
'5.8': sudo-1.8.14.3
'5.9': sudo-1.8.15
'6.0': sudo-1.8.17.1
users_unique_groups: '{{ users|selectattr("groups", "defined")|sum(attribute="groups", start=[])|list|unique }}'
users_sudo_group: "{{ 'wheel' if ansible_os_family == 'OpenBSD' else 'sudo' }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment