From 1c0951c3eba906c996e0aa8b59f5e04a4b1a1ce9 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Thu, 29 Dec 2022 11:15:03 +0100 Subject: Initial commit --- initial-deploy.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 initial-deploy.yml (limited to 'initial-deploy.yml') 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') }}" + -- cgit v1.2.3