diff --git a/manifests/runner.pp b/manifests/runner.pp index cd1cc82..2c33375 100644 --- a/manifests/runner.pp +++ b/manifests/runner.pp @@ -79,12 +79,12 @@ class podmanrunner::runner ( } # Make sure the podman user can read the /data dir - exec { "change-data-dir-owner-podman": - command => "systemd-run --wait --user --machine=runneruser1@ /bin/bash -c 'echo test'", + exec { "make-${username}${x}-own-runnerdata": + command => "systemd-run --wait --user --machine=${username}${x}@ /bin/bash -c 'echo test'", path => '/usr/bin:/usr/sbin:/bin', provider => shell, logoutput => false, - unless => "systemd-run --wait --user --machine=runneruser1@ /bin/bash -c 'podman unshare stat --format %u /opt/${username}${x}/runnerdata | grep ^1000$ && podman unshare stat --format %g /opt/${username}${x}/runnerdata | grep ^1000$'", + unless => "systemd-run --wait --user --machine=${username}${x}@ /bin/bash -c 'podman unshare stat --format %u /opt/${username}${x}/runnerdata | grep ^1000$ && podman unshare stat --format %g /opt/${username}${x}/runnerdata | grep ^1000$'", } exec { "enable-${username}${x}-linger":