Merge pull request #152 from lweller/issue_151
ignore mode and owner on windows
This commit is contained in:
commit
fca35a0567
2 changed files with 14 additions and 4 deletions
|
@ -68,6 +68,8 @@ define concat::fragment(
|
|||
$safe_target_name = regsubst($target, '[/:\n]', '_', 'GM')
|
||||
$concatdir = $concat::setup::concatdir
|
||||
$fragdir = "${concatdir}/${safe_target_name}"
|
||||
$fragowner = $concat::setup::fragment_owner
|
||||
$fragmode = $concat::setup::fragment_mode
|
||||
|
||||
# The file type's semantics are problematic in that ensure => present will
|
||||
# not over write a pre-existing symlink. We are attempting to provide
|
||||
|
@ -108,8 +110,8 @@ define concat::fragment(
|
|||
# can be relied on to be present
|
||||
file { "${fragdir}/fragments/${order}_${safe_name}":
|
||||
ensure => $safe_ensure,
|
||||
owner => $::id,
|
||||
mode => '0640',
|
||||
owner => $fragowner,
|
||||
mode => $fragmode,
|
||||
source => $source,
|
||||
content => $content,
|
||||
backup => false,
|
||||
|
|
|
@ -19,6 +19,10 @@ class concat::setup {
|
|||
} else {
|
||||
fail ('$concat_basedir not defined. Try running again with pluginsync=true on the [master] and/or [main] section of your node\'s \'/etc/puppet/puppet.conf\'.')
|
||||
}
|
||||
|
||||
# owner and mode of fragment files (on windows owner and access rights should be inherited from concatdir and not explicitly set to avoid problems)
|
||||
$fragment_owner = $osfamily ? { 'windows' => undef, default => $::id }
|
||||
$fragment_mode = $osfamily ? { 'windows' => undef, default => '0640' }
|
||||
|
||||
$script_name = $::kernel ? {
|
||||
'windows' => 'concatfragments.rb',
|
||||
|
@ -27,6 +31,10 @@ class concat::setup {
|
|||
|
||||
$script_path = "${concatdir}/bin/${script_name}"
|
||||
|
||||
$script_owner = $osfamily ? { 'windows' => undef, default => $::id }
|
||||
|
||||
$script_mode = $osfamily ? { 'windows' => undef, default => '0755' }
|
||||
|
||||
$script_command = $::kernel ? {
|
||||
'windows' => "ruby.exe ${script_path}",
|
||||
default => $script_path
|
||||
|
@ -38,8 +46,8 @@ class concat::setup {
|
|||
|
||||
file { $script_path:
|
||||
ensure => file,
|
||||
owner => $::id,
|
||||
mode => '0755',
|
||||
owner => $script_owner,
|
||||
mode => $script_mode,
|
||||
source => "puppet:///modules/concat/${script_name}",
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue