serverctl/infrastructure/create-resources/ansible/server-install.yml

17 lines
427 B
YAML
Raw Permalink Normal View History

2022-02-18 15:50:37 +01:00
- become: yes
hosts: all
2022-02-19 18:18:19 +01:00
name: server-install
2022-02-18 15:50:37 +01:00
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;