This message was deleted.
# puppet
s
This message was deleted.
b
why do you need to check if the user is defined?
defined() depends on the ordering in the catalog. rule of thumb: try to avoid it
t
Ah - well - I'm checking to see if the user exists because I want to apply an ssh_authorized_key resource, and I DON'T want to do that if the user resource for that user doesn't exist.
because that would mean the user's home directory would not exist.
I am totally open to doing this in another way
b
configure the keys where you create the user
I need to head out in a few minutes,if you can share the code I can give somr advise tomorrow
t
Ok -
i think i understand what you mean
y
I’d say as long as you have list of users defined somewhere (hiera?) you can iterate over it and create resources you need
d
Or use a
require => User['whomever']
for your keys and puppet will make sure the user is created before the keys