I'm seeing an interesting dependency issue, based on scoping of default types.  
Using 3.1.1  & aware of 
http://docs.puppetlabs.com/guides/scope_and_puppet.html#declare-resource-defaults-per-file

Our mongo::repos class is inheriting the File default that is set in the mongo 
class. 
This leads to a dependency circle, since we're using the default to set a 
require of a package for every file.

:I would have thought the scoping rules would have prevented that from 
happening. 

(I've cut most of the unnecessary stuff.)

The 2 easiest ways to fix this would be to  use yumrepo in the repos function, 
or to just put the require parameter on each file, and skip the default.

I'm more interested in why it produced the loop.


#Notes:  repos is a defined class that places a file into the correct place..  
It isn't using the yum_repo type for this, yet.

class mongo::repos {
  repos{"10gen":}
}

class mongo ($repl_set=undef) {
  class {'mongo::repos': stage => first,}
  
  package { "mongo20-10gen-server":
    ensure => installed,
  }

  File {
    require => Package['mongo20-10gen-server']
  }

  file { 
    '/etc/init.d/mongod':
      ensure  => present,
      mode    => 755,
      owner   => 'root',
      group   => 'root',
      source  => 'puppet:///modules/mongo/mongod',
      require => Package['mongo20-10gen-server'];
  }
}




Matthew Barr
Technical Architect
E: mb...@snap-interactive.com
AIM: matthewbarr1
c:  (646) 727-0535

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to