Hi All, I have a module that executes ifup and ifdown on interfaces. The node file contains the following entries node ip::addr{ "eth0": .... } node ip::addr{ "bond0": .... } node ip::addr{ "eth1": .... } node ip::addr{ "vlan2": .... } The problem I have is that vlan2 is sat on top of bond0, when bond0 file gets changed and an "exec" is run it takes down vlan2, when bond0 comes up vlan2 stays down. Now in my exec for vlan 2 I put in a subscribe => /etc/sysconfig/network-scripts/ifcfg-bond0. But what happens now is that when the ifcfg-bond0 file changes, vlan2 interface goes up and down as expected, but it happens before bond0 goes up and down, hence I get the same affect of vlan2 being down. My question is how can I ensure that vlan2 only gets executed after bond0 exec? Thanks Dan -- 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.
Hi, On 03/22/2013 09:27 PM, Dan wrote:> node ip::addr{ "eth0":Uhm, what? node ip::addr ? Wouldn''t that tell puppet that there is a host in your setup by the name of ip::addr? Confusing... Anyway, execution order is controlled using require/before parameters. These should all work, assuming the correct syntax is what I suppose it is: ip::addr { "vlan2": ..., require => Ip::Addr["bond0"] } or ip::addr { "bond0": ..., before => Ip::Addr["vlan2"] } or even Ip::Addr["vlan2"] -> Ip::Addr["bond0"] although I may have that last one backwards, I''m not accustumed to using it. HTH, Felix -- 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.
On Monday, March 25, 2013 7:59:03 AM UTC-5, Felix.Frank wrote:> > Hi, > > On 03/22/2013 09:27 PM, Dan wrote: > > node ip::addr{ "eth0": > > Uhm, what? node ip::addr ? Wouldn''t that tell puppet that there is a > host in your setup by the name of ip::addr? Confusing... >You beat me to the punch. Indeed, if the parser actually accepts code of that form then it constitutes a whopping big bug.> Anyway, execution order is controlled using require/before parameters. > These should all work, assuming the correct syntax is what I suppose it > is: > > ip::addr { "vlan2": ..., require => Ip::Addr["bond0"] } > > or > > ip::addr { "bond0": ..., before => Ip::Addr["vlan2"] } > > or even > > Ip::Addr["vlan2"] -> Ip::Addr["bond0"] > > although I may have that last one backwards, I''m not accustumed to using > it. > >Yes, you do have it backwards. The chain operators read like a flow chart: the arrow goes from the resource that must be applied earlier to the resource that must be applied later, so the last statement says the opposite of the earlier two. John -- 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.