Commit 02231844 authored by nanahira's avatar nanahira

use yum docker-compose for centos7

parent 82d889b5
Pipeline #14130 failed with stage
in 2 minutes and 55 seconds
......@@ -9,10 +9,7 @@ variables:
stage: test
tags:
- linux
image: debian:buster
script:
- apt update && apt -y install python3-pip tar wget || dnf -y install python3-pip tar wget || yum -y install python3-pip python3-setuptools tar wget
- pip3 install -U ansible==2.9 jinja2==3.0 -i https://mirrors.aliyun.com/pypi/simple/
- ansible --version
- wget -O - https://minio.mycard.moe:9000/nanahira/mitogen-0.2.9.tar.gz | tar zxvf -
- cp tests/ansible.cfg .
......@@ -20,18 +17,30 @@ variables:
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
debian:
.debian:
extends: .base
before_script:
- apt update && apt -y install python3-pip tar wget
- pip install -U ansible==2.9 jinja2==3.0 -i https://mirrors.aliyun.com/pypi/simple/
debian:
extends: .debian
image: debian:bullseye
ubuntu:
extends: .base
extends: .debian
image: ubuntu:jammy
centos7:
extends: .base
image: centos:7
before_script:
- yum -y install epel-release
- ymm -y install tar wget ansible
fedora:
extends: .base
image: fedora:latest
before_script:
- dnf -y install python3-pip tar wget
- pip install -U ansible==2.9 jinja2==3.0 -i https://mirrors.aliyun.com/pypi/simple/
......@@ -67,7 +67,7 @@
- name: 安装 Docker (yum)
become: true
yum:
name: docker-ce,docker-ce-cli,containerd.io,docker-compose-plugin
name: docker-ce,docker-ce-cli,containerd.io,docker-compose-plugin,docker-compose
update_cache: yes
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_python.version.major == 2
notify: restart_docker
......@@ -91,12 +91,6 @@
pip:
name: docker-compose
when: ansible_python.version.major == 3
- name: docker-compose pip2
become: true
pip:
name: docker-compose
executable: pip3
when: ansible_python.version.major == 2
- name: docker 创建目录
become: true
file:
......
......@@ -40,6 +40,7 @@
when: ansible_os_family == 'RedHat'
- name: pip
include_tasks: pip.yml
when: ansible_python.version.major == 3
- name: nvidia
include_tasks: nvidia.yml
when: nvidia_driver_version and ansible_os_family == 'Debian'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment