Created
May 1, 2013 12:04
-
-
Save benagricola/5494926 to your computer and use it in GitHub Desktop.
Profiles and Roles with Hiera / Puppet 3
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
| --- | |
| :backends: | |
| - yaml | |
| - gpg | |
| :gpg: | |
| :datadir: '/etc/puppet/hiera' | |
| :yaml: | |
| :datadir: '/etc/puppet/hiera' | |
| :logger: console | |
| :hierarchy: | |
| - nodes/%{::clientcert}-%{calling_module} | |
| - role/%{calling_class} | |
| - profile/%{calling_class} | |
| - common/%{calling_module} | |
| - common/common |
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 profile { | |
| $roles = hiera_array('profile::roles',[]) | |
| include $roles | |
| } | |
| class profile::puppetmaster inherits profile {} | |
| class profile::dedicated-db inherits profile {} |
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
| --- | |
| roles: | |
| - puppetmaster | |
| - puppetdb | |
| - webserver |
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 role { | |
| $classes = hiera_array('role::classes',[]) | |
| include $classes | |
| } | |
| class role::puppetmaster inherits role {} | |
| class role::puppetdb inherits role {} |
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
| --- | |
| role::classes: | |
| - puppet::db | |
| - postgresql | |
| - psql_tools |
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
| node default { | |
| include $::profile | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you try
module_name?I had better luck with it than
calling_class