Here's one way:
node nodename1, nodename3, nodename4 {
class { "class1": } ->
class { "class3": } ->
class { "class4": }
}
node nodename2 {
class { "class1": } ->
class { "class2": } ->
class { "class3": } ->
class { "class4": }
}
“Sometimes I think the surest sign that intelligent life exists elsewhere in
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
----- Original Message -----
From: "Sergey Arlashin" <[email protected]>
To: [email protected]
Sent: Thursday, August 15, 2013 1:17:46 PM
Subject: [Puppet Users] Puppet: chaining and conditionals
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 [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.