Skip to content

Instantly share code, notes, and snippets.

@nanliu
Created August 8, 2012 22:43
Show Gist options
  • Save nanliu/3299504 to your computer and use it in GitHub Desktop.
Save nanliu/3299504 to your computer and use it in GitHub Desktop.
$data = ['1', '2', '3', '4']
define loop (
$data
) {
$var = parsejson(inline_template("<%= (data.collect{|x| name+'/'+x}).to_pson %>"))
hack { $var:
}
}
define hack(
) {
notify { $name: }
}
loop { '/var':
data => $data,
}
loop { '/tmp':
data => $data,
}
loop { '/usr':
data => $data,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment