summaryrefslogtreecommitdiff
path: root/initial-deploy.yml
diff options
context:
space:
mode:
authoruvok cheetah2022-12-29 11:15:03 +0100
committeruvok cheetah2022-12-29 11:15:03 +0100
commit1c0951c3eba906c996e0aa8b59f5e04a4b1a1ce9 (patch)
tree7bab7438f5a68f8e35e9f6bb68873b741d43969b /initial-deploy.yml
Initial commit
Diffstat (limited to 'initial-deploy.yml')
-rw-r--r--initial-deploy.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/initial-deploy.yml b/initial-deploy.yml
new file mode 100644
index 0000000..8fa7330
--- /dev/null
+++ b/initial-deploy.yml
@@ -0,0 +1,19 @@
+- name: Setup Ansible user and authorized keys
+ gather_facts: false
+ hosts: new
+ tasks:
+ - name: Install sudo package
+ package:
+ name: "sudo"
+ state: "present"
+ - name: setup ansible user
+ user:
+ name: "ansible"
+ groups: "sudo"
+ password: "{{ new | password_hash('sha512') }}"
+ - name: Setup Authorized keys
+ authorized_key:
+ user: "ansible"
+ state: present
+ key: "{{ lookup('file', '~/.ssh/ansible.pub') }}"
+