Have you tried putting all the classes in the conditional?

node nodename1, nodename2, nodename3, nodename4 {
   if $fqdn == "nodename2" {
      class { "class1": } ->
      class { "class2": } ->
      class { "class3": } ->
      class { "class4": }
   } else {
      class { "class1": } ->
      class { "class3": } ->
      class { "class4": }
   }
}


-- Arthur Furlan


On Thu, Aug 15, 2013 at 2:17 PM, Sergey Arlashin
<sergeyarl.maill...@gmail.com> wrote:
> Hi!
>
> I'm using the following way to define the order and assign classes to nodes:
>
> node nodename1, nodename2, nodename3, nodename4 {
>    class { "class1": } ->
>    class { "class2": } ->
>    class { "class3": } ->
>    class { "class4": }
> }
>
> I'm fully delighted with it.
>
> But at the moment I need class2 to be executed only on nodename2. The 
> following construction doesn't work
>
> node nodename1, nodename2, nodename3, nodename4 {
>    class { "class1": } ->
>    if $fqdn == "nodename2" {
>       class { "class2": } ->
>    }
>    class { "class3": } ->
>    class { "class4": }
> }
>
> And this construction breaks the order:
>
> node nodename1, nodename2, nodename3, nodename4 {
>    class { "class1": }
>    if $fqdn == "nodename2" {
>       Class["class1"] -> class { "class2": }
>    }
>    class { "class3": } ->
>    class { "class4": }
> }
>
> What do I do in a situation like this?
>
>
> Thanks in advance.
>
> Sergey.
>
>
> --
> 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+unsubscr...@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.
> 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 puppet-users+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to