Skip to content

Instantly share code, notes, and snippets.

@willgarcia
Created September 15, 2016 11:20
Show Gist options
  • Save willgarcia/848dac8c53716c7e4eb991fa9891f37a to your computer and use it in GitHub Desktop.
Save willgarcia/848dac8c53716c7e4eb991fa9891f37a to your computer and use it in GitHub Desktop.
puppet3-loop
class test {
$foo = [
{'volume' => '/tmp/vol1', 'size' => '60'},
{'volume' => '/tmp/vol2', 'size' => '600'},
]
define myResource {
$file_path = "${name['volume']}/${name['size']}"
file { $file_path:
ensure => directory,
mode => 0600,
}
}
myResource { $foo: }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment