Skip to content

Commit

Permalink
setup: set user/group explicitly for dirs & script
Browse files Browse the repository at this point in the history
  • Loading branch information
j-vizcaino committed Mar 29, 2015
1 parent 52d0f1d commit 0193fd2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions manifests/setup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

$script_path = "${concatdir}/bin/${script_name}"

$script_owner = $::osfamily ? { 'windows' => undef, default => $::id }
$default_owner = $::osfamily ? { 'windows' => undef, default => $::id }

$script_group = $script_owner ? { 'root' => '0', default => undef }
$default_group = $default_owner ? { 'root' => '0', default => undef }

$script_mode = $::osfamily ? { 'windows' => undef, default => '0755' }

Expand All @@ -52,14 +52,16 @@

file { $script_path:
ensure => file,
owner => $script_owner,
group => $script_group,
owner => $default_owner,
group => $default_group,
mode => $script_mode,
source => "puppet:///modules/concat/${script_name}",
}

file { [ $concatdir, "${concatdir}/bin" ]:
ensure => directory,
owner => $default_owner,
group => $default_group,
mode => '0755',
}
}

0 comments on commit 0193fd2

Please sign in to comment.