Created
September 18, 2016 13:06
-
-
Save willgarcia/6d75c360582d64e6e0df2e5e75ddd807 to your computer and use it in GitHub Desktop.
puppet3-inherit-classdep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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