davydovcloud-setup/ansible/init_worker_vm.yaml
2025-02-22 20:45:29 +00:00

44 lines
886 B
YAML

---
- name: Initialise worker VM
hosts: workers
become: yes
tasks:
- name: Install essentials
apt:
pkg:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- python3-pip
- virtualenv
- python3-setuptools
- vim
- git
- btop
state: latest
update_cache: true
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu focal stable
state: present
- name: Update apt and install docker-ce
apt:
name: docker-ce
state: latest
update_cache: true
- name: Start and enable Docker
service:
name: docker
state: started
enabled: yes