Created
October 15, 2010 19:56
-
-
Save jordansissel/628837 to your computer and use it in GitHub Desktop.
Simplest example of a masterless puppet invocation using module paths
This file contains 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
. | |
./modules | |
./modules/foo | |
./modules/foo/files | |
./modules/foo/files/hello | |
./modules/foo/manifests | |
./modules/foo/manifests/init.pp | |
./manifests | |
./manifests/site.pp |
This file contains 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
Hello world |
This file contains 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 foo { | |
file { | |
"/tmp/hello": | |
ensure => file, | |
source => "puppet:///modules/foo/hello"; | |
} | |
} |
This file contains 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
snack(/tmp/z) % puppet apply --modulepath modules manifests/site.pp | |
notice: /Stage[main]/Foo/File[/tmp/hello]/ensure: defined content as '{md5}f0ef7081e1539ac00ef5b761b4fb01b3' |
This file contains 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
include foo |
so helpful... after years of kinda ignoring puppet, starting with this made it all click.
👍 on the file list, tripped up on that part with puppet for ages. where on their docs is this list??
@rileytg
The information is buried in the docs with a combination of https://docs.puppet.com/puppet/4.10/modules_fundamentals.html#example, https://docs.puppet.com/puppet/4.10/dirs_manifest.html and https://docs.puppet.com/puppet/4.10/dirs_modulepath.html.
A simple gathering of things isn't really present in the docs and is a good reason why the above gist is awesome for starting out.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! That helps a lot!