Re: [Puppet Users] Order class with parameter

2015-03-06 Thread Thomas Bendler
Hi Felix,

2015-03-06 11:38 GMT+01:00 Felix Frank :

> [
> ​...]​
>
> now I see - you're relying on https://github.com/thbe/puppet-yum to
> handle the repo, yes?
>
> You are lacking a crucial dependency then is all.
>
> Class['::yum] ->
> Class['icinga::package'] ->
> Class['icinga::config'] ->
> Class['icinga::service']
>
> I'm still a little confused as to how the yum module works, especially
> the repoIcinga parameter. Anyhow, since you seem to rely on `contain`,

this dependency should do the right thing.

[
> ​...]​
>

the yum module is quite simple, per default the standard repositories like
base, updates, epel are added to the host. Additional repositories can be
added by using parameters like class { '::yum': repoIcinga => 'yes' } which
will trigger the yum module to use standard plus Icinga (parameters instead
of hiera because I use ENC). I'll try the dependency you've suggested and
keep you updated when it's tested.

Regards Thomas
-- 
Linux ... enjoy the ride!

-- 
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/CAELoU1NqwAgD91oXwu%2BZt2ip3pDx%2BQggSJ828mGyopzgWfv5fw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Order class with parameter

2015-03-06 Thread Felix Frank
Hi,

now I see - you're relying on https://github.com/thbe/puppet-yum to
handle the repo, yes?

You are lacking a crucial dependency then is all.

Class['::yum] ->
Class['icinga::package'] ->
Class['icinga::config'] ->
Class['icinga::service']

I'm still a little confused as to how the yum module works, especially
the repoIcinga parameter. Anyhow, since you seem to rely on `contain`,
this dependency should do the right thing.

HTH,
Felix

On 03/06/2015 11:27 AM, Thomas Bendler wrote:
> Hi Felix,
> 
> it's on the forge (https://forge.puppetlabs.com/thbe/icinga). The
> declaration of the repository is in the init section
> (https://github.com/thbe/puppet-icinga/blob/master/manifests/init.pp).
> 
> The idea behind this is a generic module for yum that allows service
> modules to add repositories to the host specific for this service. In
> this case, the official Icinga repository should be added.
> 
> The problem here is simple, the repository must be added before the
> packages gets installed. Unfortunately in the way I did it, the
> repository is not necessarily added before the packages get installed
> which result in a failed run for the first time. Second run is ok
> because the repositories are in place from the first run.
> 
> Under normal circumstances I would use require to include class yum and
> yum::config::icinga but with parameters it would look cleaner.
> 
> Regards Thomas
> 
> 2015-03-05 23:12 GMT+01:00 Felix Frank  >:
> 
> On 03/04/2015 02:10 PM, Thomas Bendler wrote:
>> /contain icinga::package/
>> /contain icinga::config/
>> /contain icinga::service/
>> /
>> /
>> /Class['icinga::package'] ->/
>> /Class['icinga::config'] ->/
>> /Class['icinga::service']/
>>
>> Unfortunately the ordering isn't correct, the module try to
>> install the service before the repository is added and usable.
>> After the second run, everything is fine because the repository
>> gets added during the first run and the configuration for the
>> service could be finished. I know that require is under normal
>> circumstances the solution for that situation, but in this case I
>> can't call the class with the relevant parameter. Any hints?
> 
> That's fine. The relationship arrows are adequate for what you want.
> 
> Where is the repository declared? Is it a resource right in the
> icinga::package class?
> 
> Can you make the whole module visible somewhere, or at least a rough
> sketch of it?
> 
> Thanks,
> Felix

-- 
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/54F9839F.6050407%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Order class with parameter

2015-03-06 Thread Thomas Bendler
Hi Felix,

it's on the forge (https://forge.puppetlabs.com/thbe/icinga). The
declaration of the repository is in the init section (
https://github.com/thbe/puppet-icinga/blob/master/manifests/init.pp).

The idea behind this is a generic module for yum that allows service
modules to add repositories to the host specific for this service. In this
case, the official Icinga repository should be added.

The problem here is simple, the repository must be added before the
packages gets installed. Unfortunately in the way I did it, the repository
is not necessarily added before the packages get installed which result in
a failed run for the first time. Second run is ok because the repositories
are in place from the first run.

Under normal circumstances I would use require to include class yum and
yum::config::icinga but with parameters it would look cleaner.

Regards Thomas

2015-03-05 23:12 GMT+01:00 Felix Frank :

>  On 03/04/2015 02:10 PM, Thomas Bendler wrote:
>
>  *contain icinga::package*
> *contain icinga::config*
> *contain icinga::service*
>
>  *Class['icinga::package'] ->*
> *Class['icinga::config'] ->*
> *Class['icinga::service']*
>
>  Unfortunately the ordering isn't correct, the module try to install the
> service before the repository is added and usable. After the second run,
> everything is fine because the repository gets added during the first run
> and the configuration for the service could be finished. I know that
> require is under normal circumstances the solution for that situation, but
> in this case I can't call the class with the relevant parameter. Any hints?
>
>
> That's fine. The relationship arrows are adequate for what you want.
>
> Where is the repository declared? Is it a resource right in the
> icinga::package class?
>
> Can you make the whole module visible somewhere, or at least a rough
> sketch of it?
>
> Thanks,
> Felix
>
> --
> 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/54F8D4E1.9090908%40Alumni.TU-Berlin.de
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Linux ... enjoy the ride!
>

-- 
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/CAELoU1N92p4syenSW9jxLrADOrqrSZXBvzmC%2BW3Fo%2BaaTduSEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Order class with parameter

2015-03-05 Thread Felix Frank
On 03/04/2015 02:10 PM, Thomas Bendler wrote:
> /contain icinga::package/
> /contain icinga::config/
> /contain icinga::service/
> /
> /
> /Class['icinga::package'] ->/
> /Class['icinga::config'] ->/
> /Class['icinga::service']/
>
> Unfortunately the ordering isn't correct, the module try to install
> the service before the repository is added and usable. After the
> second run, everything is fine because the repository gets added
> during the first run and the configuration for the service could be
> finished. I know that require is under normal circumstances the
> solution for that situation, but in this case I can't call the class
> with the relevant parameter. Any hints?

That's fine. The relationship arrows are adequate for what you want.

Where is the repository declared? Is it a resource right in the
icinga::package class?

Can you make the whole module visible somewhere, or at least a rough
sketch of it?

Thanks,
Felix

-- 
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/54F8D4E1.9090908%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.