semaphore-playbooks/debian12-docker.yml

39 lines
1 KiB
YAML
Raw Normal View History

2023-07-21 00:36:14 +00:00
---
- name: Update web servers
hosts: all
remote_user: root
tasks:
- name: Install a list of packages
ansible.builtin.apt:
pkg:
- ca-certificates
- curl
- gnupg
- name: Add an Apt signing key, uses whichever key is at the URL
ansible.builtin.apt_key:
2023-07-21 00:45:49 +00:00
url: https://download.docker.com/linux/debian/gpg
state: present
- name: Download /etc/apt/keyrings/docker.gpg
ansible.builtin.get_url:
2023-07-21 00:36:14 +00:00
url: https://download.docker.com/linux/debian/gpg
2023-07-21 00:44:41 +00:00
dest: /etc/apt/keyrings/docker.gpg
2023-07-21 00:45:49 +00:00
mode: '0440'
2023-07-21 00:40:04 +00:00
2023-07-21 00:36:14 +00:00
- name: Add docker repository
2023-07-21 00:37:38 +00:00
ansible.builtin.apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
state: present
2023-07-21 00:36:14 +00:00
- name: Install a list of packages
ansible.builtin.apt:
update_cache: yes
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
- docker-compose