Add ansible to pipeline
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-02-19 18:18:19 +01:00
parent 81abb30846
commit 170c5e0730
6 changed files with 32 additions and 35 deletions

View File

@@ -0,0 +1,2 @@
[serverctl_master_hosts]
65.21.153.18

View File

@@ -0,0 +1,16 @@
- become: yes
hosts: all
name: server-install
tasks:
- name: Add the user 'kjuulh' and add it to 'sudo'
user:
name: kjuulh
group: sudo
- name:
authorized_key:
user: kjuulh
state: present
key: "{{ lookup('file', pub_key) }}"
- name: Wait for apt to unlock
become: yes
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null >2&1; do sleep 5; done;