Hey,

Hope someone can help shed some light on this. I'm written a class
that installs various software packages that we use in our
organisation, and configures them to how we like. I'm trying to use a
tag to determine which type of config to apply, so we can just tag a
load of nodes with one thing, and have the right software and config
automatically applied.

The class is structured like so (simplified):

class my_class
{
        class my_software
        {
                if tagged("my_tag_1")
                {
                        notify{"Tagged as my_tag_1": }
                        Install config A
                }
                else if tagged("my_tag_2")
                {
                        notify{"Tagged as my_tag_2": }
                        Install config B
                }
                else
                {
                        notify{"Not tagged": }
                        Install default config
                }
        }
}

Then on a node you'd do the following to have a particular software
package installed and configured based on the tag:

In site.pp

node 'servername.com' inherits default
{
        tag(my_tag_1)
        include my_class::my_software
}

After running Puppet through a catalog, the software is installed
correctly

Now the software installs properly, but it logs that it is using the
default config, so the tag being assigned in the site.pp is obviously
not being detected right?

If anyone can shed any light on this that would be really
appreciated :)

Thanks in advance!
Ryan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to