Are exported resources included, or contained?

asked 2016-02-15 14:32:13 -0500

Tomasz Olszewski gravatar image

Not sure if it's a bug, or feature

I have class like this (Imagine that there is no ordering, plain exported resources collection)

class shinken::arbiter::exported {
  Class['shinken::deps'] -> Nagios_host <<| |>> ~> Service['shinken-arbiter']
  Class['shinken::deps'] -> Nagios_service <<| |>> ~> Service['shinken-arbiter']
  Class['shinken::deps'] -> Shinken::Arbiter::Add_broker <<| |>> ~> Service['shinken-arbiter']
  Class['shinken::deps'] -> Shinken::Arbiter::Add_scheduler <<| |>> ~> Service['shinken-arbiter']
}

And class:

class shinken::arbiter {
  include shinken::deps

  contain shinken::arbiter::conf
  contain shinken::arbiter::exported

  service { 'shinken-arbiter':
    ensure    => running,
    provider  => 'debian',
    enable    => true,
    require   => Class['shinken::deps'],
  }

  Class['shinken::deps'] -> Class['shinken::arbiter::conf'] ~> Service['shinken-arbiter']
  Class['shinken::deps'] -> Class['shinken::arbiter::exported'] ~> Service['shinken-arbiter']
}

What I'm asking is... why this doesn't work, and ordering is totally ignored:

Class['shinken::deps'] -> Class['shinken::arbiter::exported'] ~> Service['shinken-arbiter']

Of course ordering directly on collected resources works perfectly (Where I asked to ignore it in code).

I couldn't find any information in documentation about. I'll appreciate any explanation


Tomek

edit retag flag offensive close merge delete