36 lines
890 B
YAML
36 lines
890 B
YAML
|
---
|
||
|
- name: set myrepo
|
||
|
blockinfile:
|
||
|
path: /etc/yum.repos.d/myrepo.repo
|
||
|
state: present
|
||
|
create: true
|
||
|
owner: "root"
|
||
|
group: "root"
|
||
|
mode: "0666"
|
||
|
block: |
|
||
|
[docker-ce-stable]
|
||
|
name=Docker CE Stable - $basearch
|
||
|
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable
|
||
|
enabled=0
|
||
|
gpgcheck=1
|
||
|
gpgkey=https://download.docker.com/linux/fedora/gpg
|
||
|
|
||
|
- name: install docker rpm
|
||
|
ansible.builtin.dnf:
|
||
|
name: "docker-ce,docker-ce-cli,docker-ce-rootless-extras,docker-buildx-plugin,docker-compose-plugin,python3,python3-pip,python3-requests"
|
||
|
state: latest
|
||
|
update_cache: true
|
||
|
skip_broken: true
|
||
|
nobest: false
|
||
|
allowerasing: true
|
||
|
enablerepo: "docker-ce-stable"
|
||
|
|
||
|
- name: make sure docker service unit is started
|
||
|
ansible.builtin.systemd_service:
|
||
|
state: started
|
||
|
name: docker
|
||
|
enabled: true
|
||
|
|
||
|
|
||
|
|