Great ! Thank you John... If I understand correctly, the "node:del" action will delete the node from dashboard database, while the "reports:prune:orphaned" will delete reports & inventory files on the server.
Does anyone see other useful actions to launch while decomissioning a node ? Best regards Yannig On Fri, Jul 26, 2013 at 2:47 AM, John Warburton <[email protected]>wrote: > On 25 July 2013 22:54, yannig rousseau <[email protected]> wrote: > >> Do you know if it's possible to lauch it from a script (maybe a sql >> request ?) > > > rake --silent node:del name=deleteme RAILS_ENV=production > > I also run a job each day to tidy up the database: > > # Purged nodes leave behind orphaned records: > # > http://docs.puppetlabs.com/pe/2.0/welcome_known_issues.html#consoles-reportsprune-task-leaves-orphaned-data > # http://projects.puppetlabs.com/issues/6717 > rake --silent RAILS_ENV=production reports:prune:orphaned >> $LOG 2>&1 > > # Recover/pack space from deletions with table optimization > # http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html > DATABASE=`grep database: > /local/puppet/dashboard/dashboard/config/database.yml | awk '{print $2}'` > USER=`grep username: /local/puppet/dashboard/dashboard/config/database.yml > | awk '{print $2}'` > PASSWORD=`grep password: > /local/puppet/dashboard/dashboard/config/database.yml | awk '{print $2}'` > mysqlcheck -u $USER --password=$PASSWORD --optimize --databases $DATABASE > >> $LOG 2>&1 > > > John > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Puppet Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/puppet-users/ZsjSJJWxeHk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
