mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
add connection plugin for buildah (#26170)
* add connection plugin for buildah Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * fixup * create a method to invoke buildah * mount container filesystem persistently so we can access it during put and fetch * use copyfile function for copying files Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * revert tests Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * fixup Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * progress (this will be squashed into a single commit before merge) * add docs for the conn plugin * fix issue invoking the integration tests * add a way to invoke commands inside the container as a different user Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * fix shellcheck warning Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
This commit is contained in:
parent
63fe40c691
commit
5b898a7732
6 changed files with 197 additions and 0 deletions
5
test/integration/connection-buildah.yaml
Normal file
5
test/integration/connection-buildah.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- hosts: buildah-container
|
||||
connection: buildah
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: connection_buildah }
|
1
test/integration/targets/connection_buildah/aliases
Normal file
1
test/integration/targets/connection_buildah/aliases
Normal file
|
@ -0,0 +1 @@
|
|||
needs/root
|
1
test/integration/targets/connection_buildah/posix.sh
Symbolic link
1
test/integration/targets/connection_buildah/posix.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
../connection_posix/test.sh
|
7
test/integration/targets/connection_buildah/runme.sh
Executable file
7
test/integration/targets/connection_buildah/runme.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
ANSIBLE_TEST_REMOTE_INTERPRETER='' ./posix.sh "$@"
|
||||
|
||||
ANSIBLE_TEST_REMOTE_INTERPRETER='' ANSIBLE_REMOTE_USER="1000" ./posix.sh "$@"
|
|
@ -0,0 +1,12 @@
|
|||
[buildah]
|
||||
buildah-container ansible_ssh_pipelining=true
|
||||
[buildah:vars]
|
||||
# 1. install buildah
|
||||
# 2. create container:
|
||||
# $ sudo buildah from --name=buildah-container python:2
|
||||
# 3. run test:
|
||||
# $ ANSIBLE_TEST_REMOTE_INTERPRETER= ansible-test integration --local connection_buildah
|
||||
# 6. remove container
|
||||
# $ sudo buildah rm buildah-container
|
||||
ansible_host=buildah-container
|
||||
ansible_connection=buildah
|
Loading…
Add table
Add a link
Reference in a new issue