Skip to content

Commit

Permalink
Do not hardcode the 'root' group name, use the 'gid' for that.
Browse files Browse the repository at this point in the history
Non-Linux systems, i.e. *BSD might not have a group 'root', but
have group wheel.
What is in common everywhere is the 'gid' of these groups is '0'.

Setting the group => '0' instead of group => 'root' is a common
pattern seen in many other modules.

This fixes the setting of the group for the npmrc file.
For consistency, I also changed the group in manifests/repo/nodesource/yum.pp
even it doesn't affect me.

Ran into the problem on OpenBSD.
  • Loading branch information
buzzdeee committed Apr 21, 2016
1 parent dc08606 commit 3874378
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
path => '/root/.npmrc',
content => template('nodejs/npmrc.erb'),
owner => 'root',
group => 'root',
group => '0',
mode => '0600',
}
}
2 changes: 1 addition & 1 deletion manifests/repo/nodesource/yum.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

file { '/etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL':
ensure => file,
group => 'root',
group => '0',
mode => '0644',
owner => 'root',
source => "puppet:///modules/${module_name}/repo/nodesource/NODESOURCE-GPG-SIGNING-KEY-EL",
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/nodejs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
'ensure' => 'file',
'path' => '/root/.npmrc',
'owner' => 'root',
'group' => 'root',
'group' => '0',
'mode' => '0600',
)
end
Expand Down

0 comments on commit 3874378

Please sign in to comment.