I'm starting to use puppet to manage a couple of servers and I'm not sure how to achieve the following.
I've got a
users module which I use to create common users across all servers. I've got a
git module which I use to install git and set up a system-wide config in
/etc/gitconfig. What I'd like to do is:
- On servers which are configured to install git (not all of them), go and drop a (templated)
.gitconfiginto the home directories of all existing users. And obviously manage this for changes to the template.
- Add the
.gitconfigfor all future users. But I don't feel this belongs in the
usersmodule - I think it belongs in the
gitmodule. It feels like I want to know when any user has been added (not just a given instance of user), and then be able to access the parameters of that user creation (e.g. home directory, real name and username).
Essentially, part 2 would be easy if I just deployed a templated
.gitconfig to all users created by the
users module. But I don't really want users to have a
.gitconfig file if git isn't installed on the system. So what I'm really trying to say is "for all managed users on this system, if git is installed, manage a