Last active
December 26, 2015 03:19
-
-
Save antaflos/7085586 to your computer and use it in GitHub Desktop.
hiera hashes with no key-value pairs for feeding into create_resources
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
# How does one define a hash with a name but no keys/values? | |
--- | |
site_repos_ppa: | |
'ppa:git-core/ppa': | |
'ppa:mercurial-ppa/releases': |
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
# calls to apt::ppa usually look like this: | |
apt::ppa { 'ppa:git-core/ppa': } | |
apt::ppa { 'ppa:mercurial-ppa/releases': } | |
# how to use with create_resources? | |
$ppas = hiera_hash('site_repos_ppa', {}) | |
create_resources('@apt::ppa', $ppas) |
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
# This results in: | |
Error: Could not retrieve catalog from remote server: | |
Error 400 on SERVER: can't convert nil into Hash at | |
/etc/puppet/environments/production/modules/repos/manifests/virtual.pp:9 | |
on node kvmhost01.example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment