OP#421 add user

This commit is contained in:
Arne Teuke
2026-02-12 16:49:36 +01:00
parent 07fbf99731
commit 9323e51f52
2 changed files with 34 additions and 14 deletions

View File

@@ -40,7 +40,7 @@ All dependencies must be included in the catalogue.
## Deployment ## Deployment
* native Puppet deployment - native Puppet deployment
via site.pp or nodes.pp via site.pp or nodes.pp
@@ -50,9 +50,9 @@ node 'example.example.net' {
} }
``` ```
* through Foreman: - through Foreman:
In order to apply parameters through Foreman, **__confdroid_nagios::params__** must be added to the host or host group in question. In order to apply parameters through Foreman, **__confdroid_nagios::params__*- must be added to the host or host group in question.
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/). See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
@@ -66,22 +66,22 @@ All files and directories are configured with correct selinux context. If selinu
## Support ## Support
* OS: Rocky 9 - OS: Rocky 9
* Puppet 8 - Puppet 7 # Puppet does not support Nagios in Puppet 8 anymore, although it still works
## Tests ## Tests
* Puppet Lint - Puppet Lint
* excluded tests: - excluded tests:
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters. - `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
* Puppet Parser - Puppet Parser
* ERB Template Parser - ERB Template Parser
* Sonar Quality Gate - Sonar Quality Gate
## Contact Us ## Contact Us
* [contact Us](https://confdroid.com/contact/) - [contact Us](https://confdroid.com/contact/)
* [Feedback Portal](https://feedback.confdroid.com/) - [Feedback Portal](https://feedback.confdroid.com/)
## Disclaimer ## Disclaimer

View File

@@ -8,6 +8,26 @@ class confdroid_nagios::main::user (
) inherits confdroid_nagios::params { ) inherits confdroid_nagios::params {
if $ng_nagios_server == $fqdn { if $ng_nagios_server == $fqdn {
require confdroid_nagios::main::install require confdroid_nagios::main::install
#config here
group { $ng_user:
ensure => present,
name => $ng_user,
gid => $ng_u_uid,
allowdupe => false,
}
user { $ng_user:
ensure => present,
name => $ng_user,
allowdupe => false,
comment => $ng_u_comment,
uid => $ng_u_uid,
gid => $ng_user,
groups => $ng_u_groups,
managehome => true,
home => $ng_user_home,
shell => $ng_user_shell,
require => Group[$ng_user],
}
} }
} }