Skip to content

Commit

Permalink
Allow uncompressed daemons
Browse files Browse the repository at this point in the history
This is the case for the apache and postgres exporters
  • Loading branch information
sathieu committed Aug 16, 2017
1 parent 56dbfab commit 6598d55
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions manifests/daemon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,32 @@

case $install_method {
'url': {
archive { "/tmp/${name}-${version}.${download_extension}":
ensure => present,
extract => true,
extract_path => '/opt',
source => $real_download_url,
checksum_verify => false,
creates => "/opt/${name}-${version}.${os}-${arch}/${name}",
cleanup => true,
if $download_extension == '' {
file { "/opt/${name}-${version}.${os}-${arch}":
ensure => directory,
owner => 'root',
group => 0, # 0 instead of root because OS X uses "wheel".
mode => '0755',
}
-> archive { "/opt/${name}-${version}.${os}-${arch}/${name}":
ensure => present,
source => $real_download_url,
checksum_verify => false,
before => File["/opt/${name}-${version}.${os}-${arch}/${name}"],
}
} else {
archive { "/tmp/${name}-${version}.${download_extension}":
ensure => present,
extract => true,
extract_path => '/opt',
source => $real_download_url,
checksum_verify => false,
creates => "/opt/${name}-${version}.${os}-${arch}/${name}",
cleanup => true,
before => File["/opt/${name}-${version}.${os}-${arch}/${name}"],
}
}
-> file { "/opt/${name}-${version}.${os}-${arch}/${name}":
file { "/opt/${name}-${version}.${os}-${arch}/${name}":
owner => 'root',
group => 0, # 0 instead of root because OS X uses "wheel".
mode => '0555',
Expand Down

0 comments on commit 6598d55

Please sign in to comment.