summaryrefslogtreecommitdiff
path: root/roles/core/admin-users/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-04-22 19:53:43 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-04-22 19:53:43 +0200
commitc17fccec08689065c8f4f902544e984521c7437b (patch)
tree762e7e346682fefa054e69391bdb85ba6f8f76b0 /roles/core/admin-users/tasks
parentch-apps: upgrade whawty-auth to latest release (diff)
revamp: user/group handling
Diffstat (limited to 'roles/core/admin-users/tasks')
-rw-r--r--roles/core/admin-users/tasks/Debian.yml5
-rw-r--r--roles/core/admin-users/tasks/OpenBSD.yml12
-rw-r--r--roles/core/admin-users/tasks/main.yml37
3 files changed, 0 insertions, 54 deletions
diff --git a/roles/core/admin-users/tasks/Debian.yml b/roles/core/admin-users/tasks/Debian.yml
deleted file mode 100644
index 6d8d6f95..00000000
--- a/roles/core/admin-users/tasks/Debian.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- name: install sudo
- apt:
- name: sudo
- state: present
diff --git a/roles/core/admin-users/tasks/OpenBSD.yml b/roles/core/admin-users/tasks/OpenBSD.yml
deleted file mode 100644
index 1a04a3d3..00000000
--- a/roles/core/admin-users/tasks/OpenBSD.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: install sudo
- openbsd_pkg:
- name: sudo--
- state: present
-
-- name: allow wheel group to use sudo
- lineinfile:
- regexp: '^#?\s*%wheel(\s+)ALL=\(ALL\) SETENV: ALL$'
- line: '%wheel\1ALL=(ALL) SETENV: ALL'
- backrefs: yes
- dest: /etc/sudoers
diff --git a/roles/core/admin-users/tasks/main.yml b/roles/core/admin-users/tasks/main.yml
deleted file mode 100644
index a5b1c7bd..00000000
--- a/roles/core/admin-users/tasks/main.yml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-- name: load os/distrubtion/version specific variables
- include_vars: "{{ item }}"
- with_first_found:
- - files:
- - "{{ ansible_distribution_release }}.yml"
- - "{{ ansible_distribution }}.yml"
- - "{{ ansible_os_family }}.yml"
-
-- name: load os/distrubtion/version specific tasks
- vars:
- params:
- files:
- - "{{ ansible_distribution_release }}.yml"
- - "{{ ansible_distribution }}.yml"
- - "{{ ansible_os_family }}.yml"
- loop: "{{ q('first_found', params) }}"
- loop_control:
- loop_var: tasks_file
- include_tasks: "{{ tasks_file }}"
-
-- name: add admin users
- loop: "{{ admin_users_group | union(admin_users_host) }}"
- user:
- name: "{{ item }}"
- state: present
- password: "{{ hostvars[inventory_hostname]['vault_user_password_'+item] }}" ## TODO: find nicer way to do this
- groups: "{{ admin_users_groups }}"
- append: yes
- shell: "{{ users[item].shell | default(admin_users_default_shell) }}"
-
-- name: install ssh keys for admin users
- loop: "{{ admin_users_group | union(admin_users_host) }}"
- authorized_key:
- user: "{{ item }}"
- key: "{{ users[item].ssh | join('\n') }}"
- exclusive: yes