Closed traylenator closed 7 months ago
Perhaps a note about Windows (in)compatibility?
Added a note about POSIX not windows. .. I dont have a windows machine to hand to see what it does.
Added a note about POSIX not windows. .. I dont have a windows machine to hand to see what it does.
Me neither, but quoting https://ruby-doc.org/core-3.1.2/Etc.html
The Etc module provides access to information typically stored in files in the /etc directory on Unix systems.
Reading that, I think the behavior is completely undefined on Windows so I'd say it's just incompatible as you did now.
Interesting I added to the CI :
On a random VM here with just an apply the ordering is fine. In github CI it seems the require from the exec to the user was not respected.
Interesting I added to the CI :
- Adding a user
- Using that user in Deferred call to exec .
On a random VM here with just an apply the ordering is fine. In github CI it seems the require from the exec to the user was not respected.
It's a lack of https://puppet.atlassian.net/browse/PUP-11526 on Puppet 7 causing problems. Trying to mark it pending for 7 but totally failing. :cry:
I started adding this as it was needed for https://github.com/voxpupuli/puppet-systemd/pull/443
however the final solution used completely avoids the need for this.
Close this unless someone thinks it's really worth having.
This was needed to get the uid for a user to find the path $XDG_RUNTIME_DIR=/run/user/<uid>
This is now avoided by running an exec wrapped in systemd-run
as per https://github.com/voxpupuli/puppet-systemd/pull/443
This function is no longer required and given its a bit of a non-trivial one lets not add it.
Summary
Given a username
stdlib::getpwnam
returns the password entry for that user.Example
then
$passwd_entry
would contain:Checklist
puppet apply
)results in: