From 0a845c7097da023a9296fec098d4f10778cba5d5 Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Sun, 10 Dec 2023 15:30:14 +0100 Subject: [PATCH 1/2] Fixes merge conflicts --- defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index f2478f4..d8197fa 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -19,4 +19,5 @@ enable_sudo: yes # Allow passwordless sudo (applied to group wheel) enable_passwordless_sudo: yes # Skip provisioning of the firewall -skip_firewall: no \ No newline at end of file +skip_firewall: no +authorized_keys_are_exclusive: false # Be careful, this will delete non-Ansible-managed authorized keys from the target! -- 2.45.3 From ef9cfb8ced51987b316204d1e3909ae69c05cd03 Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Sun, 10 Dec 2023 15:25:53 +0100 Subject: [PATCH 2/2] Adds option to make authorized_keys exclusive (default: false) --- tasks/users.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/users.yml b/tasks/users.yml index 3789a05..8dfd11a 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -44,8 +44,9 @@ user: "{{ item }}" state: present key: "{{ lookup('file', 'public_keys/id_{{ item }}.pub') }}" + exclusive: "{{ authorized_keys_are_exclusive | bool }}" with_items: "{{ users }}" - ignore_errors: yes + ignore_errors: true - block: - name: 'Ensure that wheel group is existing' -- 2.45.3