Skip to content

Instantly share code, notes, and snippets.

@willgarcia
Created September 18, 2016 13:06
Show Gist options
  • Save willgarcia/6d75c360582d64e6e0df2e5e75ddd807 to your computer and use it in GitHub Desktop.
Save willgarcia/6d75c360582d64e6e0df2e5e75ddd807 to your computer and use it in GitHub Desktop.
puppet3-inherit-classdep
class test::config inherits test::params {
exec {
"hello":
command => "/bin/mv ${file} /tmp/test",
require => Class['test::install'],
}
}
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: }
include 'test::install'
include 'test::config'
}
class test::install {
exec {
"hello1":
command => '/bin/touch /tmp/test-install',
}
}
class test::params {
$file = '/tmp/test-install'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment