xoxys.docker_engine/tasks/install.yml
Robert Kaussow e9e83d2f8d
All checks were successful
continuous-integration/drone/push Build is passing
feat: add option to add custom unit override options (#5)
Reviewed-on: #5
2023-06-05 22:55:25 +02:00

48 lines
1.2 KiB
YAML

---
- block:
- name: Add Docker CE repository
yum_repository:
name: "docker-ce"
file: "Docker-CE"
description: "Docker CE Stable"
baseurl: "https://download.docker.com/linux/centos/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/stable"
gpgcheck: yes
enabled: yes
gpgkey: "https://download.docker.com/linux/rhel/gpg"
- name: Install dependencies
package:
name: "{{ item }}"
state: present
loop: "{{ dockerengine_packages_extra }}"
- name: Install python dependencies
pip:
name: "{{ item }}"
virtualenv: /opt/python2/ansible-deps
loop: "{{ dockerengine_ansible_deps }}"
- name: Add docker-compose wrapper
template:
src: bin/docker-compose.j2
dest: /usr/local/bin/docker-compose
owner: root
group: root
mode: 0755
- name: Ensure to remove old docker packages
package:
name:
- docker
- docker-common
- docker-engine
state: absent
- name: Install packages
package:
name: "{{ item }}"
state: present
loop: "{{ dockerengine_packages }}"
become: True
become_user: root