aboutsummaryrefslogtreecommitdiff
path: root/playbook.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbook.yml')
-rw-r--r--playbook.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/playbook.yml b/playbook.yml
new file mode 100644
index 0000000..6a4bdd5
--- /dev/null
+++ b/playbook.yml
@@ -0,0 +1,18 @@
+---
+- hosts: all
+ sudo: yes
+ tasks:
+ - name: Create user
+ user: name={{ username }}
+
+ - name: Upload user key
+ authorized_key: user={{ username }}
+ key="{{ item }}"
+ with_file:
+ - keys/{{ username }}.pub
+
+ - name: Upload global keys
+ authorized_key: user={{ username }}
+ key="{{ lookup('file', item) }}"
+ with_fileglob:
+ - keys/global/*.pub