--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAWpFTFioMKsLcNDKtKtG8o5Fo7X7Z-kBzqCWsp2VasRGNZBLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAWpFTEcHYL%2BTa3VYmeE7QNyKeMEch%3Db0Epotx_VEAiigTqnGg%40mail.gmail.com.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAWpFTFv6uCE1uiJMsRQUGLXjGXwfuvZXWt%3DnMg0fgEqi0fTZw%40mail.gmail.com.
Hi Rich.Thanks for that but when I try to do so I got that error
Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not find class postgresql for puppet-sql.alflab.net on
node puppet-sql.alflab.net
It seems it can't find the class at all even it's all there and that's
why I thought the init.pp would be why.
Alfredo
Yeah that is not going to work.
Your Hiera file is a list of classes you're including on the host,
I'm assuming your code is using the hiera_include function. Basically Puppet is turning the classes listed in that file into an array and then trying to apply them all.
What you've done is try to include the same class three times. That won't work.
You would just do:
postgresql::server
Just that one line.
classes:
- sudo
- selinux
- postgresql::server
postgresql::server::db: test
postgresql::server::password: test
postgresql::server::user: test
include 'postgresql::server'
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6a183a91-056e-4ae1-8103-fc05f65ad04c%40googlegroups.com.
Hi all.
sorry for late reply. So....It's not completely wrong what I am trying
to do but still not working.
My idea its' not to have at all any node.pp or environment.pp etc but
drive everything from hiera/yaml.
I was able to do so till I need to install postgres because I'd like
to evaluate puppetDB.
Thanks for your return.
It is noted that hiera your search directly in the common.yaml, it is not your path hierarchy.
Here's an example search or hiera good in the order of hierarchy:
My hierarchy is:
:hierarchy:
- "node/%{fqdn}"
- "virtual/%{virtual}"
- "osfamily/%{osfamily}"
- common
# hiera -d -m toto.local sudo::configs
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Hiera YAML backend starting
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Looking up sudo::configs in YAML backend
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Looking for data source node/toto.local
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Cannot find datafile /etc/puppet/hieradb/node/ toto.local .yaml, skipping
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Looking for data source virtual/vmware
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Cannot find datafile /etc/puppet/hieradb/virtual/vmware.yaml, skipping
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Looking for data source osfamily/RedHat
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Cannot find datafile /etc/puppet/hieradb/osfamily/RedHat.yaml, skipping
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Looking for data source common
DEBUG: Fri Sep 04 11:36:29 +0000 2015: Found sudo::configs in common
{"toto"=>{"content"=>"toto ALL=(ALL) NOPASSWD: ALL"}}
So check the following:
1 / verifies that the file points /etc/hiera.yaml of your file /etc/puppet/hiera.yaml:
ls -rtla /etc/hiera.yaml
/etc/hiera.yaml -> /etc/puppet/hiera.yaml
2 / Check the owners:
Chown puppet: puppet /etc/puppet/hiera.yaml
Chown -R puppet: puppet / etc / puppet / hieradata /
Restart your instance Puppet Master for the changes to take effect.
Thanks for your return.
It is noted that hiera your search directly in the common.yaml, it is not your path hierarchy.
Here's an example search or hiera good in the order of hierarchy:
My hierarchy is:
:hierarchy:
- "node/%{fqdn}"
- "virtual/%{virtual}"
- "osfamily/%{osfamily}"
- common
So check the following:
1 / verifies that the file points /etc/hiera.yaml of your file /etc/puppet/hiera.yaml:
ls -rtla /etc/hiera.yaml
/etc/hiera.yaml -> /etc/puppet/hiera.yaml
2 / Check the owners:
Chown puppet: puppet /etc/puppet/hiera.yaml
Chown -R puppet: puppet / etc / puppet / hieradata /