Skip to content

Instantly share code, notes, and snippets.

@kornypoet
Created April 27, 2015 22:00
Show Gist options
  • Save kornypoet/c486de276dc6b9a99ac1 to your computer and use it in GitHub Desktop.
Save kornypoet/c486de276dc6b9a99ac1 to your computer and use it in GitHub Desktop.
define install_waterline() {
exec { "Download tar ${title}":
command => "wget https://s3-us-west-1.amazonaws.com/wld-product-downloads/${title}",
onlyif => 'test ! -d /opt/waterlinedata',
user => 'root',
group => 'root',
cwd => '/opt',
require => Exec[waterlinedata_user_hdfs], #TODO: Maybe include whatever this is as well?
} ->
exec { "Extract tar ${title}":
onlyif => 'test ! -d /opt/waterlinedata',
cwd => '/opt',
command => "tar xf ${title}",
user => 'root',
group => 'root',
} ->
exec { 'Chmod Waterline Dir':
cwd => '/opt',
command => 'chmod -R 0755 waterlinedata',
}
}
if str2bool($hdp_waterline) {
install_waterline { 'waterlinedata-distribution-1.1.0-HDP22.tar.gz': }
elsif str2bool($hdp_waterline) {
install_waterline { 'waterlinedata-distribution-1.1.0-CDH53.tar.gz': }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment