cleaning up nodes with exported resources

32 views
Skip to first unread message

Luca Gioppo

unread,
Jan 17, 2013, 5:26:57 AM1/17/13
to puppet...@googlegroups.com
Hi,
I'm developing my modules for managing the env with puppet and I have this problem.

I use exported resources.
Much like the following example:
node a {
    @@file { "/tmp/foo": content => "fjskfjs\n", tag => "foofile", }
}
node b {
    File <<| tag == 'foofile' |>>
}

(I use the database resource, but for sake of ease even the file will do)

It happens that the exported resource has wrong value inside (in the case of the DB maybe the hosname of the user) I have difficulty in fixing the problem since it seems (but may be me that does not understand the things completely) that it keeps the old values or in the following runs it generates a new exported resource that lives with the other, it does not substitute it.

This make a mess in the mysql since I find many user accounts on the DB.

Any idea on how to correctly use the exported resources in a developing environment and on how to correctly clean up stuff?

I'm on puppet 3 and using stored config.
Thanks
Luca

Luca Gioppo

unread,
Jan 17, 2013, 6:03:37 AM1/17/13
to puppet...@googlegroups.com
Ok my fault for unclean situation.
After dropping the user in the DB and "COMMITTING" the modified node to the environment the exported resource got modified and rthere is only one and not many.
Obviously users created in the DB stay there if created wrongly.
Luca
Reply all
Reply to author
Forward
0 new messages