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: ...@@ -9,10 +9,7 @@ variables:
stage: test stage: test
tags: tags:
- linux - linux
image: debian:buster
script: 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 - ansible --version
- wget -O - https://minio.mycard.moe:9000/nanahira/mitogen-0.2.9.tar.gz | tar zxvf - - wget -O - https://minio.mycard.moe:9000/nanahira/mitogen-0.2.9.tar.gz | tar zxvf -
- cp tests/ansible.cfg . - cp tests/ansible.cfg .
...@@ -20,18 +17,30 @@ variables: ...@@ -20,18 +17,30 @@ variables:
- ansible-playbook tests/test.yml --syntax-check - ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml - ansible-playbook tests/test.yml
debian: .debian:
extends: .base 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 image: debian:bullseye
ubuntu: ubuntu:
extends: .base extends: .debian
image: ubuntu:jammy image: ubuntu:jammy
centos7: centos7:
extends: .base extends: .base
image: centos:7 image: centos:7
before_script:
- yum -y install epel-release
- ymm -y install tar wget ansible
fedora: fedora:
extends: .base extends: .base
image: fedora:latest 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 @@ ...@@ -67,7 +67,7 @@
- name: 安装 Docker (yum) - name: 安装 Docker (yum)
become: true become: true
yum: 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 update_cache: yes
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_python.version.major == 2 when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 7 and ansible_python.version.major == 2
notify: restart_docker notify: restart_docker
...@@ -91,12 +91,6 @@ ...@@ -91,12 +91,6 @@
pip: pip:
name: docker-compose name: docker-compose
when: ansible_python.version.major == 3 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 创建目录 - name: docker 创建目录
become: true become: true
file: file:
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
- name: pip - name: pip
include_tasks: pip.yml include_tasks: pip.yml
when: ansible_python.version.major == 3
- name: nvidia - name: nvidia
include_tasks: nvidia.yml include_tasks: nvidia.yml
when: nvidia_driver_version and ansible_os_family == 'Debian' 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