1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Run CI jobs with newer podman 4 (#525)

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2022-11-28 17:02:24 -05:00 committed by GitHub
parent 95649a6e66
commit 4f6ed89607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 66 additions and 70 deletions

View file

@ -65,7 +65,7 @@ jobs:
python-version:
- 3.8
include:
- runner-os: ubuntu-latest
- runner-os: ubuntu-20.04
runner-python-version: 2.7
ansible-version: ansible<2.10
python-version: 2.7

View file

@ -31,8 +31,8 @@ on:
jobs:
test_podman_container:
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
@ -115,8 +115,8 @@ jobs:
shell: bash
test_podman_container_with_pip:
name: Podman container w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman container w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -29,8 +29,8 @@ on:
jobs:
test_podman_container_idem:
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -31,8 +31,8 @@ on:
jobs:
test_podman_container_info:
name: Podman container info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman container info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
@ -44,7 +44,7 @@ jobs:
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-latest
- ubuntu-22.04
python-version:
- 3.9

View file

@ -31,8 +31,8 @@ on:
jobs:
test_podman_containers:
name: Podman multi containers ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman multi containers ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_export:
name: Podman export ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman export ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_generate_systemd:
name: Podman generate systemd ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman generate systemd ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -27,8 +27,8 @@ on:
jobs:
test_podman_image:
name: Podman image ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman image ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -27,8 +27,8 @@ on:
jobs:
test_podman_image_info:
name: Podman image info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman image info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_import:
name: Podman import ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman import ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_load:
name: Podman load ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman load ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_login:
name: Podman login ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman login ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_login_info:
name: Podman login info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman login info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_logout:
name: Podman logout ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman logout ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_network:
name: Podman network ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman network ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_network_info:
name: Podman network info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman network info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_play:
name: Podman play ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman play ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -29,8 +29,8 @@ on:
jobs:
test_podman_pod:
name: Podman pod ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman pod ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -29,8 +29,8 @@ on:
jobs:
test_podman_pod_info:
name: Podman pod info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman pod info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_save:
name: Podman save ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman save ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -27,8 +27,8 @@ on:
jobs:
test_podman_secret:
name: Podman secret ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman secret ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
@ -110,8 +110,8 @@ jobs:
shell: bash
test_podman_secret_with_pip:
name: Podman secret w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman secret w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_tag:
name: Podman tag ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman tag ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -25,8 +25,8 @@ on:
jobs:
test_podman_volume:
name: Podman volume ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman volume ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -27,8 +27,8 @@ on:
jobs:
test_podman_volume_info:
name: Podman volume info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman volume info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash

View file

@ -3,7 +3,7 @@
become: true
shell: |
. /etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${VERSION_ID}/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | apt-key add -
apt-get update
when: ansible_distribution|lower == "ubuntu"

View file

@ -63,6 +63,7 @@
- vim
- dnsmasq
- slirp4netns
state: latest
- name: Discover slirp4netns version
shell: slirp4netns -v | grep version | awk {'print $3'}

View file

@ -109,7 +109,7 @@ def get_pod_info(module, executable, name):
rc, out, err = module.run_command(command + [pod])
errs.append(err.strip())
rcs += [rc]
if not out or json.loads(out) is None:
if not out or json.loads(out) is None or not json.loads(out):
continue
result.append(json.loads(out))
return result, errs, rcs

View file

@ -609,7 +609,7 @@
- system1.podman_systemd.keys() | list | first == 'containzzzzcontainer1'
- system1.podman_systemd.values() | list | length > 0
- service_file.stat.exists | bool
- "'stop -t 120 container1' in system1.podman_systemd.values() | list | first"
- "'-t 120 container1' in system1.podman_systemd.values() | list | first"
- "'Restart=always' in system1.podman_systemd.values() | list | first"
- "'autogenerated by Podman' not in system1.podman_systemd.values() | list | first"

View file

@ -298,19 +298,6 @@
that:
- pod13_info is not changed
- name: Start pod without shares
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
name: pod1
state: started
share: ""
register: pod14_info
- name: Check info
assert:
that:
- pod14_info is changed
- name: Start pod with default shares
containers.podman.podman_pod:
executable: "{{ test_executable | default('podman') }}"
@ -729,7 +716,7 @@
assert:
that:
- system1.podman_systemd.keys() | list | length == 3
- "'stop -t 120 ' in system1.podman_systemd['poditto-pod2']"
- "'-t 120 ' in system1.podman_systemd['poditto-pod2']"
- "'Restart=always' in system1.podman_systemd['poditto-pod2']"
- "'autogenerated by Podman' not in system1.podman_systemd['poditto-pod2']"
- podsys_stat.stat.exists | bool

View file

@ -54,6 +54,15 @@
that:
- img.stat.exists
- name: Save image
containers.podman.podman_save:
executable: "{{ test_executable | default('podman') }}"
image: k8s.gcr.io/pause
dest: /tmp/imagedir-docker
force: true
format: docker-dir
compress: true
- name: Save image
containers.podman.podman_save:
executable: "{{ test_executable | default('podman') }}"
@ -61,7 +70,6 @@
dest: /tmp/imagedir
force: true
format: oci-dir
compress: true
- name: Check file
stat: