init
This commit is contained in:
commit
3bf4cc5e41
3 changed files with 58 additions and 0 deletions
36
tasks/main.yml
Normal file
36
tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
- name: Install prerequisites
|
||||
apt:
|
||||
pkg:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- gnupg
|
||||
- lsb-release
|
||||
- python3-pip
|
||||
- name: Add APT key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
keyring: /etc/apt/keyrings/docker.gpg
|
||||
- name: Add repository
|
||||
apt_repository:
|
||||
repo: "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
|
||||
- name: Install Docker
|
||||
apt:
|
||||
pkg:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-compose-plugin
|
||||
- name: Install Python modules
|
||||
pip:
|
||||
name:
|
||||
- docker
|
||||
- docker-compose
|
||||
- name: Copy daemon.json
|
||||
copy:
|
||||
dest: /etc/docker/daemon.json
|
||||
content: "{{ docker_daemon_config | to_json }}"
|
||||
- name: Start Docker
|
||||
systemd:
|
||||
name: docker
|
||||
enabled: true
|
||||
state: started
|
Reference in a new issue