Hi List,

I have running installation of the puppet-dashboard (a really nice tool)
and import my classes and group according to my need with the following
small bash lines.

# add classes into dashboard
for name in `ls /var/lib/puppet/manifests/classes/ | sed s/\.pp$//g -`
   do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production
nodeclass:add name=$name;

# add nodes to its classes
for node in `find /var/lib/puppet/manifests/nodes/ | sed s/.*net\.pp$//g -`
   do for class in `grep include $node | sed s/include//g -`
     do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production
node:addclass name=`echo $node | sed s/\.pp$//g - | cut -c30-100 -`

# add groups into dashboard
for group in `find /var/lib/puppet/manifests/nodes/ -name *net.pp | cut
-c33-100 | sed s/\.pp//g -`;
   do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production
nodegroup:add name=$group;

# add noeds to its group
for node in `find /var/lib/puppet/manifests/nodes/ | sed s/.*net\.pp//g -`;
   do group=`grep inherits $node | awk '{split($0,a,"\""); print a[4]}'`;
   rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production
node:addgroup name=`echo $node | sed s/\.pp//g - | cut -c30-100 -`

# add classes to a group
for group in `find /var/lib/puppet/manifests/nodes/ -name "*net\.pp"`;
   do for class in `grep include $group | sed s/include//g -`;
     do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production
nodegroup:addclass name=`echo $group | sed s/\.pp$//g - | cut -c33-100 -`

But in any way I have two questions.

1.) Way are the classes not imported automatically like the nodes? I know
that the better way would be to use modules but till now I could not change
all me classes to modules and in anyway modules are also not imported
directly into the puppet-dashboard.

2.) I have now groups that have some classes and some nodes. And even if I
click on a node I can see the classes that it has from its group (really
cool). But why is the counter of a classes that belonges to a group not
increased by the number of the nodes in the group?

Thanks for any reason in advance

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+unsubscribe@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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppuppet-users @
postedMay 21, '13 at 4:24p
activeMay 21, '13 at 4:24p

1 user in discussion

Lucy Netcetera: 1 post



site design / logo © 2022 Grokbase