Created
October 14, 2010 23:32
-
-
Save jordansissel/627281 to your computer and use it in GitHub Desktop.
set an exported resource
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
define placeholder() { | |
# Nothing to do, it's a placeholder! | |
} | |
class bar { | |
Placeholder <<| title == "importantserver" |>> | |
file { | |
"/tmp/y": | |
require => Placeholder["importantserver"], | |
content => "Importantserver is ready!\n"; | |
} | |
} | |
include bar |
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
define placeholder() { | |
# Nothing to do, it's a placeholder! | |
} | |
class foo { | |
@@placeholder { | |
"importantserver": | |
} | |
} | |
include foo |
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
# The first run fails because there is no 'importantserver' placeholder resource. | |
frontend1(~) % puppet apply --storeconfigs --config ./puppet.conf pull.pp | |
Could not find dependency Placeholder[importantserver] for File[/tmp/y] at /home/jordan/pull.pp:12 | |
# Have another server export this resource | |
ops(~/pp) % puppet apply --storeconfigs --config ./puppet.conf push.pp | |
# Try again, which works because the exported resource is found. | |
frontend1(~) !1! % puppet apply --storeconfigs --config ./puppet.conf pull.pp | |
notice: /Stage[main]/Bar/File[/tmp/y]/content: content changed '{md5}5a2f711ba4198f0db5e6b9e38a8f2d64' to '{md5}53cadf1c93f077aae3747e6507d7aa8e' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment