geerlingguy.ansible-role-do.../tasks/setup-RedHat.yml

53 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2017-02-24 05:08:18 +01:00
---
- name: Ensure old versions of Docker are not installed.
package:
name:
- docker
- docker-common
- docker-engine
state: absent
- name: Add Docker GPG key.
rpm_key:
2019-03-19 19:33:20 +01:00
key: "{{ docker_yum_gpg_key }}"
state: present
2017-02-24 05:08:18 +01:00
- name: Add Docker repository.
get_url:
url: "{{ docker_yum_repo_url }}"
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
owner: root
group: root
mode: 0644
- name: Configure Docker Nightly repo.
ini_file:
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
section: 'docker-{{ docker_edition }}-nightly'
option: enabled
value: '{{ docker_yum_repo_enable_nightly }}'
2020-08-20 19:37:17 +02:00
mode: 0644
2022-06-07 14:34:26 +02:00
no_extra_spaces: true
- name: Configure Docker Test repo.
ini_file:
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
section: 'docker-{{ docker_edition }}-test'
option: enabled
value: '{{ docker_yum_repo_enable_test }}'
2020-08-20 19:37:17 +02:00
mode: 0644
2022-06-07 14:34:26 +02:00
no_extra_spaces: true
2020-09-28 17:48:25 +02:00
- name: Configure containerd on RHEL 8.
2020-08-21 11:04:07 +02:00
block:
2020-09-28 17:48:25 +02:00
- name: Ensure container-selinux is installed.
2020-08-21 11:04:07 +02:00
package:
name: container-selinux
state: present
2020-09-28 17:48:25 +02:00
- name: Ensure containerd.io is installed.
2020-08-21 11:04:07 +02:00
package:
name: containerd.io
state: present
when: ansible_distribution_major_version | int == 8