Is it possible to use sh/bash variable in puppet manifest file? For example i'm using (Yes it's ugly, i know):
var=$(curl -s http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | grep 'linux-x64.tar.gz' | awk '{print $7}' | sed 's#MB","filepath":"##g#' | sed 's#"};###' | sort -V | tail -1 | rev | cut -c 3- | rev)
echo $var
This will give me latest Oracle java ver. 8 exact download link. My wish is to use it in tomcat.pp manifest file. Something like this:
tomcat::install { '/opt/tomcat8':
source_url => '$var'
}
Do i have to create custom facts
or is there easy way to achieve this?