mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-03 23:01:48 +00:00
Fix tests for new Podman CI: add fuse-overlayfs for buildah tests Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
121 lines
3.1 KiB
YAML
121 lines
3.1 KiB
YAML
---
|
|
- hosts: "{{ host|default('all') }}"
|
|
gather_facts: true
|
|
vars:
|
|
ansible_pip_version: '<2.10'
|
|
distro: "{{ ansible_distribution }}{{ ansible_distribution_major_version }}"
|
|
tasks:
|
|
|
|
- when: os_setup|default(true)|bool
|
|
become: true
|
|
block:
|
|
|
|
- name: Install Python3 and pip
|
|
package:
|
|
name:
|
|
- python3
|
|
- python3-pip
|
|
when:
|
|
- distro != 'CentOS7'
|
|
- setup_python|default(true)|bool
|
|
|
|
- name: Install EPEL for CentOS 7
|
|
package:
|
|
name:
|
|
- epel-release
|
|
when:
|
|
- distro == 'CentOS7'
|
|
- setup_python|default(true)|bool
|
|
|
|
- name: Install Python and pip for CentOS 7
|
|
package:
|
|
name:
|
|
- python
|
|
- python-pip
|
|
when:
|
|
- distro == 'CentOS7'
|
|
- setup_python|default(true)|bool
|
|
|
|
- name: Install Python packaging
|
|
command: pip install --upgrade setuptools packaging pip
|
|
environment:
|
|
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
|
|
|
- name: Install virtualenv
|
|
pip:
|
|
name:
|
|
- virtualenv
|
|
environment:
|
|
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
|
when: ansible_venv is defined
|
|
|
|
- name: Install repositories if need
|
|
include_tasks: install_repos.yml
|
|
|
|
- when:
|
|
- distro == 'Ubuntu24'
|
|
block:
|
|
|
|
- name: Remove existing golang-github-containers-common
|
|
package:
|
|
name:
|
|
- podman
|
|
- buildah
|
|
- skopeo
|
|
- crun
|
|
state: absent
|
|
|
|
- name: Remove existing golang-github-containers-common
|
|
package:
|
|
name: golang-github-containers-common
|
|
state: absent
|
|
|
|
- name: Run autoremove
|
|
command: apt-get autoremove -y
|
|
|
|
- name: Install podman
|
|
package:
|
|
name:
|
|
- podman
|
|
- buildah
|
|
- skopeo
|
|
- git
|
|
- vim
|
|
- dnsmasq
|
|
- slirp4netns
|
|
- netavark
|
|
- uidmap
|
|
- passt
|
|
- fuse-overlayfs
|
|
state: latest
|
|
|
|
- name: Remove virtualenv if need
|
|
file:
|
|
path: "{{ ansible_venv }}"
|
|
state: absent
|
|
when:
|
|
- clean_venv|default(false)|bool
|
|
- ansible_venv is defined
|
|
|
|
- name: Install ansible
|
|
pip:
|
|
name: ansible
|
|
version: "{{ ansible_pip_version }}"
|
|
extra_args: --upgrade
|
|
virtualenv: "{{ ansible_venv|default(omit) }}"
|
|
virtualenv_site_packages: "{{ ansible_venv_site_packages|default(omit) }}"
|
|
environment:
|
|
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
|
when:
|
|
- ansible_venv is defined
|
|
|
|
- name: Get podman version
|
|
shell: |
|
|
podman version || true
|
|
podman version
|
|
buildah version
|
|
podman info --debug
|
|
buildah info --debug
|
|
conmon --version
|
|
runc --version
|
|
changed_when: false
|