Created
April 12, 2012 23:26
-
-
Save garthk/2371859 to your computer and use it in GitHub Desktop.
File source fallback style for Puppet modules
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 elasticsearch { | |
# ... | |
file { "/etc/elasticsearch/elasticsearch.yml": | |
ensure => present, | |
source => ["puppet:///files/site-elasticsearch/${fqdn}/elasticsearch.yml", | |
"puppet:///files/site-elasticsearch/elasticsearch.yml", | |
"puppet:///modules/elasticsearch/elasticsearch.yml"], | |
owner => root, | |
group => root, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the community's preferred style for modules giving default content for a file, but allowing users to supply their own content on a site or node basis?
I first tripped over the idea in lelutin/puppet-apt_cacher_ng@1ba3928. I'm now using
puppet:///files/
to avoidError 400 on SERVER: Not authorised to call find
.