Yes, I think it's a good way to go, Alfredo. I would normally have a hierarchy like the following. - secrets (e-yaml-gpg) - nodes - environment - roles - common
Gets by in most setups. You'll still need a site.pp file but in can just have: hiera_include('classes') (pretty sure that's the call, not at a my laptop). You can also do something to handle default nodes (ones that don't match the hiera data yet) by having one default node specified in your site.pp Up to you. HTH, Den > On 19 Mar 2015, at 23:35, Alfredo De Luca <alfredo.del...@gmail.com> wrote: > > Hi all. > Anyone on this question? > > > > On Thu, Mar 19, 2015 at 10:07 AM, Alfredo De Luca > <alfredo.del...@gmail.com> wrote: >> Hi all. >> I am testing hiera in our enviroment and I wonder if I can manage >> everything from hiera without using the main site.pp. >> >> Do you think is the right way? or I should use site.pp as well? >> >> >> Here is what I am testing and so far so good. >> >> --------- hiera.yaml >> --- >> :backends: >> - yaml >> >> :hierarchy: >> - "environments/%{::environment}" >> - "nodes/%{::fqdn}" >> - common >> >> :yaml: >> :datadir: /etc/puppet/hieradata/ >> >> >> --------- hiera.yaml >> >> --------- common.yaml >> --- >> classes: >> - ntp >> - resolver >> - yum >> - motd >> >> ntp::restrict: >> ntp::autoupdate: false >> ntp::service_enable: true >> ntp::service_ensure: running >> ntp::servers: >> - 10.4.123.3 >> - 10.4.123.4 >> - 10.5.123.3 >> - 10.5.123.4 >> >> resolver::search: >> - xxx.xxx.com >> resolver::dns_servers: >> - 10.4.17.18 >> - 10.4.17.20 >> - 10.5.17.18 >> - 10.5.17.20 >> >> yum::source_repo_dir: 'puppet:///REPO_FILES/' >> yum::clean_repos: true >> >> motd::content: '##### TEST #####' >> --------- common.yaml >> >> >> >> -- >> Alfredo > > > > -- > Alfredo > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAAWpFTFRCjdGWPiap_%3D8ZoxyPvuc50a-aLLKSpjjQTF-1jxD9Q%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/14723D8F-141A-4F5A-805F-845292F4C65E%40gmail.com. For more options, visit https://groups.google.com/d/optout.