summaryrefslogtreecommitdiff
path: root/playbook.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'playbook.yaml')
-rw-r--r--playbook.yaml10
1 files changed, 10 insertions, 0 deletions
diff --git a/playbook.yaml b/playbook.yaml
index be2e655..48262c2 100644
--- a/playbook.yaml
+++ b/playbook.yaml
@@ -9,6 +9,16 @@
hosts: all
tasks:
+ - name: Ensure all authorized keys are copied to root account
+ remote_user: root
+ ansible.posix.authorized_key:
+ key: |
+ {% for key in authorized_key_files %}
+ {{ lookup('file', key) }}
+ {% endfor %}
+ user: root
+ exclusive: true
+
# Now, we create a non-root user with sudo privileges
- name: Ensure wheel group exists
remote_user: root