This repository has been archived on 2023-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
skylab-ansible/roles/swarm/tasks/install.yaml

27 lines
647 B
YAML

---
- name: Install Docker repository
become: true
ansible.builtin.get_url:
url: https://download.docker.com/linux/centos/docker-ce.repo
dest: /etc/yum.repos.d/docker-ce.repo
owner: root
group: "{{ ansible_user }}"
mode: 0644
register: _docker_repo_status
- name: Install docker repository GPG key
become: true
ansible.builtin.rpm_key:
key: https://download.docker.com/linux/centos/gpg
state: present
- name: Install Docker
become: true
ansible.builtin.dnf:
state: present
name:
- docker-ce
- docker-ce-cli
- containerd.io
update_cache: "{{ _docker_repo_status.changed }}"