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

Fix overlayfs issue in CI for buildah connection (#245)

This commit is contained in:
Sergey 2021-04-14 12:08:37 +03:00 committed by GitHub
parent ba763e2988
commit ecc02870df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,7 @@
- hosts: "{{ target_hosts }}"
gather_facts: no
tasks:
- name: Create a user
user:
name: testuser

View file

@ -12,11 +12,16 @@ function run_ansible {
}
# Issue in buildah: https://github.com/containers/buildah/issues/3126
# Hack is from: https://github.com/containers/buildah/issues/3120#issuecomment-815889314
# PR is merged here: https://github.com/containers/storage/pull/871
export STORAGE_OPTS="overlay.mount_program=/usr/bin/fuse-overlayfs"
# First run as root
run_ansible "$@"
# Create a normal user
${SUDO:-} ansible all -i "test_connection.inventory" -m "user" -a 'name="testuser"'
# Create a non-root user
${SUDO:-} ${ANSIBLECMD:-ansible-playbook} -i "test_connection.inventory" ../connection/create-nonroot-user.yml \
-e target_hosts="buildah"
# Second run as normal user
ANSIBLE_VERBOSITY=4 ANSIBLE_REMOTE_USER="testuser" run_ansible "$@" | tee check_log