Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Available parameters are:
* group
* shadow
* hosts
* initgroups
* bootparams
* aliases
* automount
Expand Down
8 changes: 8 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ Host names and numbers, used by gethostbyname() and related functions.

Default value: $nsswitch::params::hosts_default

##### `initgroups`

Data type: `Optional[Variant[String, Array]]`

Supplementary group access list, used by getgrouplist(3) function.

Default value: $nsswitch::params::initgroups

##### `netgroup`

Data type: `Optional[Variant[String, Array]]`
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
# @param hosts
# Host names and numbers, used by gethostbyname() and related functions.
#
# @param initgroups
#
# Supplementary group access list, used by getgrouplist(3) function.
# *Optional* (defaults to $nsswitch::params::initgroups)
#
# @param netgroup
# Network-wide list of hosts and users, used for access rules.
#
Expand Down Expand Up @@ -92,6 +97,7 @@
Variant[String] $file_perms = '0644',
Optional[Variant[String, Array]] $group = $nsswitch::params::group_default,
Optional[Variant[String, Array]] $hosts = $nsswitch::params::hosts_default,
Optional[Variant[String, Array]] $initgroups = $nsswitch::params::initgroups,
Optional[Variant[String, Array]] $netgroup = $nsswitch::params::netgroup_default,
Optional[Variant[String, Array]] $netmasks = $nsswitch::params::netmasks_default,
Optional[Variant[String, Array]] $networks = $nsswitch::params::networks_default,
Expand Down
8 changes: 8 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
$rpc_default = ['files']
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
'Fedora': {
$aliases_default = ['files','nisplus']
Expand All @@ -59,6 +60,7 @@
$shadow_default = ['files']
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
/Ubuntu|Debian/: {
$aliases_default = undef
Expand All @@ -80,6 +82,7 @@
$shadow_default = ['compat']
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
'SLES': {
$aliases_default = ['files']
Expand All @@ -101,6 +104,7 @@
$shadow_default = undef
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
'Solaris': {
$aliases_default = ['files','nisplus']
Expand All @@ -122,6 +126,7 @@
$shadow_default = undef
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
'Gentoo': {
$aliases_default = ['files']
Expand All @@ -143,6 +148,7 @@
$shadow_default = ['compat']
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
'FreeBSD': {
$aliases_default = undef
Expand All @@ -164,6 +170,7 @@
$shadow_default = undef
$shells_default = ['files']
$sudoers_default = undef
$initgroups = undef
}
'LinuxMint': {
$file_group = 'root'
Expand All @@ -185,6 +192,7 @@
$shadow_default = ['compat']
$shells_default = undef
$sudoers_default = undef
$initgroups = undef
}
'Archlinux': {
$file_group = 'root'
Expand Down
3 changes: 3 additions & 0 deletions templates/nsswitch.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ aliases: <%= [*$::nsswitch::aliases].join(" ") %>
<% if $::nsswitch::shells { -%>
shells: <%= [*$::nsswitch::shells].join(" ") %>
<% } -%>
<% if $::nsswitch::initgroups { -%>
initgroups: <%= [*$::nsswitch::initgroups].join(" ") %>
<% } -%>