On Tuesday, May 29, 2018 at 7:25:11 AM UTC-5, Ugo Bellavance wrote:
>
>
>
> On Tuesday, May 29, 2018 at 6:55:01 AM UTC-4, Arnau wrote:
>>
>>
>>
>> 2018-05-29 12:24 GMT+02:00 Ugo Bellavance <ug...@lubik.ca>:
>>
>>>
>>>
>>> On Tuesday, May 29, 2018 at 5:54:54 AM UTC-4, Arnau wrote:
>>>>
>>>> Hi,
>>>>
>>>> postgresql::server::contrib::package_name: 'rh-postgresql96-postgresql-
>>>> contrib'
>>>> postgresql::server::contrib::packages_ensure: present
>>>>
>>>>
>>> I don't get the error anymore.  It's not doing what it's supposed but 
>>> I'll look into it. I'll try the same thing with the manifest just to see.
>>>
>>
>> What is it doing ?
>>
>
> It should be install the package with the name specified in 
> postgresql::server::contrib::package_name
>
> Setting the parameters in the manifest works:
>
> class {'postgresql::server::contrib':
>   package_name        => 'rh-postgresql96-postgresql-contrib',
>   package_ensure      => 'present',
> }
>
> But this hiera data doesn't:
>
> postgresql::server::contrib::package_name: 
> 'rh-postgresql96-postgresql-contrib'
> postgresql::server::contrib::packages_ensure: present
>


That's awfully surprising if those data appear in an Hiera data file from 
which you are successfully loading other data.  If that is in fact 
happening then the most likely reason would be that a resource-like class 
declaration for that class somewhere in your manifest set is explicitly 
declaring different parameter values for that class (in which case the 
Hiera data will not be consulted).  But if that were the case, then I would 
expect Puppet to raise an error when you added your own resource-like 
declaration of the same class.  Another possibility is that there are 
conflicting data in some higher-priority level of your data hierarchy, but 
that would be surprising considering how you arrived where you now are.

My best guess, therefore, is that the file in which you placed the 
parameter data is not being consulted at all for the node in question (so 
that in fact you are *not* successfully loading other data from it, either).

 

> So class parameters are automatically looked up in hiera, but define 
> parameters (or whatever name it is for objects) is not?
>


That is correct.  There are good reasons for it, but a discussion of those 
would be tangential.  If you're interested, you can find at least one such 
discussion in the archives of this group.


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/2c0d893c-9e75-4fa9-b780-59bcdbc0a671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to