Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-28 Thread Alfredo De Luca
Hi David et all. I didn't have that much time to investigate further but I tried only to have postgresql::server in my xxx.xxx.xxx.yaml and it install the default postgresql so not what I wanted. So it looks like I can't use postgresql (or mysql) only with hiera. Should I contact the team

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-09 Thread David Levray
Hello, Its configuration file is hiera.yaml, and path depends on how it is invoked, which can be one of the following ways: -When Is invoked from puppet, the path will be: /etc/puppet/hiera.yaml -When Is invoked from CLI or when used in the Ruby code: /etc/hiera.yaml So you have to see for the

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-08 Thread Alfredo De Luca
Hi David. Sorry.. I meant if for example I add an user on nodes/puppet-sql.alflab.net puppet will create that user. Ok I will do what you suggested. But I think it's still not clear why I can't user postgresql on nodes/puppet-sql.alflab.net and get the db created/managed by puppet. Alfredo On

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-08 Thread jcbollinger
On Friday, September 4, 2015 at 6:54:52 AM UTC-5, David Levray wrote: > > Thanks for your return. > > It is noted that hiera your search directly in the common.yaml, it is not > your path hierarchy. > Oh, come on. It is not erroneous to have an Hiera hierarchy consisting of only one level.

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-07 Thread David Levray
Hello, sorry, but I do understand your réponce: but if I change something on the nodes/puppet-sql.alflab.net it gets reflected into the node with the new catalog. Mysql installed? different commands past returns 'nil': >> DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking up postgresql::server

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-07 Thread Alfredo De Luca
Hi David. Here is the output [root@puppet-server puppet]# ls -rtla /etc/hiera.yaml lrwxrwxrwx 1 root root 22 Sep 4 14:46 /etc/hiera.yaml -> /etc/puppet/hiera.yaml [root@puppet-server puppet]# The owner was root so I changed it as per your suggestions so now it's puppet. But still can't

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-04 Thread Alfredo De Luca
Hi David. Here is the output. [root@puppet-server puppet]# hiera -d postgresql::server DEBUG: Fri Sep 04 20:18:29 +1000 2015: Hiera YAML backend starting DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking up postgresql::server in YAML backend DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking for data

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-04 Thread David Levray
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}"

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-03 Thread jcbollinger
On Thursday, September 3, 2015 at 6:20:42 AM UTC-5, Alfredo De Luca wrote: > > Hi all. > sorry for late reply. SoIt's not completely wrong what I am trying > to do but still not working. > As far as I can tell, in fact, what you're trying to do is mostly *right*. You seem to be in

[Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-03 Thread David Levray
In /etc/puppet/hieradata/nodes/ create a file 'puppet-sql.alflab.net.yaml' that contains: --- postgresql::server: restart your instance PuppetMaster (service httpd/apache2 restart) Then we test hiera debug mode if it finds the information: hiera -d postgresql::server hiera -d sudo::configs

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-03 Thread Alfredo De Luca
Hi all. sorry for late reply. SoIt'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

[Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-02 Thread David Levray
Hello, please : cat hiera.yaml puppet module list puppet module list --environment xxx (xx = environment your node) ty Le samedi 29 août 2015 06:31:29 UTC+2, Alfredo De Luca a écrit : > > Hi all. > Using Puppet open source 3.8 with hiera for test purpose. > > I installed

[Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-01 Thread Alfredo De Luca
Hi Rich. Thanks. I tried without - postgresql. Only adding postgresql::server::db: test postgresql::server::password: test postgresql::server::user: test What happens is I don't get that error but it doesn't do anything either. Alfredo On Sat, Aug 29, 2015 at 2:31 PM, Alfredo De Luca

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-01 Thread Rich Burroughs
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

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-01 Thread jcbollinger
On Monday, August 31, 2015 at 12:43:14 AM UTC-5, Alfredo De Luca wrote: > > 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

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-01 Thread jcbollinger
On Tuesday, September 1, 2015 at 1:59:10 AM UTC-5, Rich Burroughs wrote: > > Yeah that is not going to work. > > Your Hiera file is a list of classes you're including on the host, What makes you say that? The Hiera fragment presented does not appear to satisfy that description, and the

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-09-01 Thread Rich Burroughs
John, what made me say that is the thread. He was trying to apply a class to a node in his Hiera data that doesn't have an init.pp. It seems like he is new to class namespacing and didn't know how to apply a class that wasn't in init.pp. That's the discussion we were having. I may have

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-08-31 Thread Rich Burroughs
The one in your example was: postgresql And yes that won't work because there's not an init.pp. There's actually not a class in the module called postgresql. You need to use the specific classes like: postgresql::client postgresql::server Whichever ones you need. There is a list of them on

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-08-31 Thread Rich Burroughs
Also if any of that is unclear there is a doc on auto loading and namespacing here: https://docs.puppetlabs.com/puppet/latest/reference/lang_namespaces.html On Sun, Aug 30, 2015 at 11:18 PM Rich Burroughs wrote: > The one in your example was: > > postgresql > > And yes

[Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-08-30 Thread Alfredo De Luca
Hi all. I found out that niether puppetlabs-postgresql or mysql has the init.pp so that's why when I call them from hiera they fail. Is it normal? Alfredo On Sat, Aug 29, 2015 at 2:31 PM, Alfredo De Luca alfredo.del...@gmail.com wrote: Hi all. Using Puppet open source 3.8 with hiera for

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-08-30 Thread Alfredo De Luca
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

Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded

2015-08-30 Thread Rich Burroughs
A lot of modules do have one, but not all of them. It's not required, it's a design decision. You should be able to add the classes you want to assign using the proper scoping like: mysql::server Rich On Sun, Aug 30, 2015 at 9:12 PM Alfredo De Luca alfredo.del...@gmail.com wrote: Hi all. I