Exported resources not realizing

59 views
Skip to first unread message

David Kerr

unread,
Jan 11, 2013, 5:59:17 PM1/11/13
to puppet...@googlegroups.com
I'm sure i'm doing something incorrectly, I'm basing this off of what I've seen in other modules, but it's not working as I'd expect.

Specifically, If i change the parameters to server_config. My mongo.conf doesn't ever reflect that change.
As a matter of fact, I can delete mongo.conf and run puppet agent --test and it will not get replaced.

If i remove the "@@" it works correctly, (except i don't get the exported resource that I want to use elsewhere).

I've got a node:
node /^test\d+$/ {
  include stdlib
  include cc-mongo
  @@cc-mongo::server_config{ '$fqdn':
        sequence => 0}
}

and cc-mongo::server_config:
define cc-mongo::server_config (
  $replSet     = "$environment",
  $server_name = "$hostname",
  $ipaddress   = "$ipaddress",
  $sequence    = 0,
) {
  file { 'mongo.conf':
    path    => '/etc/mongod.conf',
    notify  => Service['mongod'],
    owner   => mongod,
    group   => mongod,
    mode    => 0640,
    content => template('cc-mongo/mongod.conf.erb');
  }
}

Any suggestions would be great.

Thanks

Craig Dunn

unread,
Jan 11, 2013, 6:12:49 PM1/11/13
to puppet...@googlegroups.com

> If i remove the "@@" it works correctly, (except i don't get the
> exported resource that I want to use elsewhere).
>
>

Can you show how and where you are realizing the exported resource? From
what I can see in your code you will export it ok but you're not
realizing it anywhere....

Regards
Craig

--
Craig Dunn
Professional Services
Puppet Labs Inc.
http://www.puppetlabs.com

David Kerr

unread,
Jan 11, 2013, 6:21:39 PM1/11/13
to puppet...@googlegroups.com
Ah-ha! 

i had gotten confused by the examples I was using because they were realizing with a collector. 
(making me think that If i didn't want to collect I didn't need to realize).

Now that I've added the code to realize it's working. 

Thank you!
Reply all
Reply to author
Forward
0 new messages