Ask Your Question

How do I remove a contact::fragment for a node that no longer exists?

asked 2014-01-20 06:26:38 -0600

robrwo gravatar image

We use munin to monitor our machines. Each machine "registers" itself as a munin node to the puppetmaster using a concat::fragment, e.g.

$order = fqdn_rand(1000,500)

@@concat::fragment { "${::fqdn}_munin":
  target  => '/etc/munin/munin.conf',
  content => template('munin/munin.erb'),
  tag     => 'munin,
  order   => $order,


We've turned one of the machines off, permanently, but the puppetmaster remembers the concat::fragment so ensures that it's added.

How do we tell puppet that the node is removed, and to delete all such fragments (and any other information about the node)?

edit retag flag offensive close merge delete


Note: we've removed the node in the dashboard., but the concat::fragment is still instantiated.

robrwo gravatar imagerobrwo ( 2014-01-20 06:35:08 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-20 09:16:44 -0600

robrwo gravatar image

Answer is in - run

  puppet node deactivate
edit flag offensive delete link more


Erm. Are you sure about that ? puppet node deactivate prevents exported resources being realised from the point you deactivate the note. The file that the concat::fragment creates will have ...(more)

jonuwz gravatar imagejonuwz ( 2014-01-20 12:50:15 -0600 )edit

@jonuwz: we can't alter the exported fragment to be absent when the server is gone. However, deactivating the node did the trick. The fragment went away. Whether this is ...(more)

robrwo gravatar imagerobrwo ( 2014-01-22 05:57:27 -0600 )edit

This is correct. deactivate should be used for decommissioning nodes. The "puppet node clean --unexport" is purely to work around cases where a purge is not possible (resource doesn't ...(more)

ken gravatar imageken ( 2014-01-22 08:08:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-01-20 06:26:38 -0600

Seen: 352 times

Last updated: Jan 20 '14