On Thursday, September 3, 2015 at 6:20:42 AM UTC-5, Alfredo De Luca wrote:
>
> Hi all. 
> sorry for late reply. So....It'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 better command of your site and situation than some of 
the earlier answers gave you credit for.

 

> My idea its' not to have at all any node.pp or environment.pp etc but 
> drive everything from hiera/yaml. 
>
>

Note that file names "node.pp" and "environment.pp" are not inherently 
meaningful.  I suppose you mean that you don't want to declare or use any 
node blocks (which do not necessarily have to appear in a file named 
node.pp).  Maybe you also mean you want to rely on default environment 
configuration, but that has nothing to do with any file named 
environment.pp.  Perhaps you mean instead that you don't want to write any 
"environment.conf" file.

 

> I was able to do so till I need to install postgres because I'd like 
> to evaluate puppetDB. 
>
>

Ok.  It's not clear what the problem is, or at least why what we already 
discussed did not solve it for you.

It seems you are already well aware of how to cause a class to be declared 
in your configuration: you cause its name to be included in the array 
associated with key "classes" in Hiera.  (For others who may read this, the 
key "classes" is conventional, but not special -- its significance is that 
there is a call to hiera_include('classes') in the this site's site 
manifest.)  The original problem was that you did not appreciate the 
distinction between a module and a class with the same name as that module, 
nor that modules are not required to contain such a class at all.  As a 
result, you attempted to declare a class that the Puppetlabs "postgresql" 
module does not, in fact, provide.  The solution to that problem is first 
and foremost to declare the correct class instead -- apparently 
"postgresql::server".  We covered that already, and you know how to do it.

There may be other classes you need to declare, and possibly first to 
write, to express your site-specific requirements for databases, users, 
etc. within your PostgreSQL server.  You apparently know how to write your 
own classes and modules as well, so I don't suppose that in itself is the 
problem.  You have only now mentioned *why* you are trying to configure 
postgres; it is the details in support of that use of postgres that would 
be covered by a class such as I describe.

As a secondary matter, you probably need to declare appropriate parameter 
values for class postgresql::server.  You have shown that you know how to 
declare class parameter values in Hiera as well.  You may need to find the 
*correct* parameter values for your purposes; if that's the issue then 
please focus the discussion there.

On the other hand, I would hope that the puppetdb package for your OS would 
take care of requiring PostgreSQL as a dependency, and of setting up the 
appropriate database, user, password, etc..  Thus, if using puppetdb is the 
sole reason for your attempt to manage a postgres server then perhaps your 
effort is going in the wrong direction.

Any way around, we can't help you very well without a clear idea of what 
exactly you're doing *now*, and what exactly Puppet is doing with that 
(which is not what you want it to do).  "Still not working" does not give 
us anything useful, particularly when we are uncertain what you're even 
doing that isn't working.


John

-- 
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/1cb8a037-ea0d-4439-9e52-9c3a1141dbc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to