From 1bb6ea5effa7e0e0bf4f02ca945830086bfc1386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sat, 23 Jun 2018 14:44:00 +0200 Subject: [PATCH] Pubkeys should be added to the root user as well. --- roles/ubuntu_base/tasks/users.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/ubuntu_base/tasks/users.yml b/roles/ubuntu_base/tasks/users.yml index 82a787d..1608901 100644 --- a/roles/ubuntu_base/tasks/users.yml +++ b/roles/ubuntu_base/tasks/users.yml @@ -13,3 +13,9 @@ user: "{{ item.key }}" key: "{{ item.value.key }}" with_dict: "{{ users | default({}) }}" + +- name: "Add ssh authorized_keys to root user" + authorized_key: + user: "root" + key: "{{ item.value.key }}" + with_dict: "{{ users | default({}) }}"