Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman::rootles fails with "Could not find resource " #58

Open
tuxmaster5000 opened this issue Apr 25, 2023 · 1 comment
Open

podman::rootles fails with "Could not find resource " #58

tuxmaster5000 opened this issue Apr 25, 2023 · 1 comment

Comments

@tuxmaster5000
Copy link

Sample code:

$user = 'foo'
$user_home = "/var/lib/${user}"
group { $user: system => true }
user { $user:
    home       => $user_home,
    shell      => '/sbin/nologin',
    system     => true,
    managehome => true,    
    require    => Group[$user]
  }
class { 'podman':
    nodocker                 => absent,
    podman_docker_pkg_ensure => absent,
    manage_subuid            => true,
  }
  podman::rootless { $user: }

It will fails with:
Error 500 on SERVER: Server Error: Could not find resource 'File[/var/lib/foo]' in parameter 'require'
I think the problem is line 22 and 24 of manifests/rootless.pp because puppet don't know the values on all times.

@southalc
Copy link
Owner

Interesting. The user attributes define "managehome => true", but that apparently does not add the directory as a file resource. To work around this, you should be able to declare $user_home as a separate file resource.
I'm working on a rewrite of the module where I hope to address the current issues by using custom providers, but until it's finished this behavior won't change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants