semaphore-playbooks/debian12-docker.yml

34 lines
899 B
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:
url: https://download.docker.com/linux/debian/gpg
2023-07-21 00:44:24 +00:00
dest: /etc/apt/keyrings/docker.gpg]
2023-07-21 00:36:14 +00:00
state: present
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