I would like to improve my skills in Foreman
and Puppet
. To do so I would like to get some easy tasks done.
In my configuration all servers belonging to host group "Basic" should get a basic setup - including adding a new user and adding this to the sudsers-file.
To do so I'm using example42/sudo
Now I would like to add a user by adding a file to the directory /etc/sudoers.d/
.
The documentation tells me to use sudo::directive
.
This is an example:
sudo::directive { 'jenkins':
content => "jenkins ALL=NOPASSWD: /usr/sbin/puppi \n", # Double quotes and newline (\n) are needed here
}
Now my question is: I know how to add a class to a host group. I also know how to override params.
My current configuration for the host group "Basis" looks like this:
But how can I use sudo::directive
in Foreman?