Skip to content

Instantly share code, notes, and snippets.

@nanliu
Created March 18, 2015 23:16
Show Gist options
  • Save nanliu/80b1abbb3fe15f79ab15 to your computer and use it in GitHub Desktop.
Save nanliu/80b1abbb3fe15f79ab15 to your computer and use it in GitHub Desktop.
cat tests/demo.pp
$version = '0.20.5'
$file_name = "elasticsearch-${version}.deb"
$source_url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${file_name}"
$source_checksum = "${source_url}.sha1.txt"
$checksum = inline_template('<%= require "open-uri"; open(@source_checksum).read.split.first %>')
notice $checksum
nan@tenjin ~/src/puppet-elasticsearch ±archive⚡ » bundle exec puppet apply tests/demo.pp
Notice: Scope(Class[main]): b51e4dc55490bc03e54d7f8f2d41affc54773206
Notice: Compiled catalog for tenjin.la.frd.directv.com in environment production in 0.26 seconds
Notice: Finished catalog run in 0.01 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment