ansible-role-bootstrap icon indicating copy to clipboard operation
ansible-role-bootstrap copied to clipboard

Make role compatible with Podman

Open gotmax23 opened this issue 2 years ago • 2 comments


name: Make role compatible with Podman about: See below


Describe the change This patch passes the raw command to install packages through /bin/sh. Otherwise, when running this role against a podman container using the podman connection plugin, podman tries to find an executable in the $PATH named LANG=C and fails.

Testing In case a feature was added, how were tests performed?

I tested this using molecule test with the following patch applied to molecule/default/molecule.yml

diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml
index 1e24c87..af08020 100644
--- a/molecule/default/molecule.yml
+++ b/molecule/default/molecule.yml
@@ -12,14 +12,11 @@ lint: |
   yamllint .
   ansible-lint
 driver:
-  name: docker
+  name: podman
 platforms:
   - name: "bootstrap-${image:-fedora}-${tag:-latest}${TOX_ENVNAME}"
     image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}"
     command: /sbin/init
-    volumes:
-      - /sys/fs/cgroup:/sys/fs/cgroup:ro
-    privileged: yes
     pre_build_image: yes
 provisioner:
   name: ansible

gotmax23 avatar May 22 '22 04:05 gotmax23

Cool, let's wait what CI-tests results in, but looks promising.

robertdebock avatar May 22 '22 05:05 robertdebock

@robertdebock, can you please take a look?

gotmax23 avatar May 27 '22 20:05 gotmax23