I have a custom resource type that upgrades a MSI and kicks off a reboot. It uses a schedule parameter (configurable through an ENC) so we can control when the node is allowed to reboot. I''d like to add a notify (or call warn()) if not within the schedule, e.g. "Skipping ensure version of MSI x, not within allowed schedule". Any easy way to do this? If not any tips on getting started with a custom function are appreciated. Adam -- 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.
Jo Rhett
2013-Feb-08 20:50 UTC
Re: [Puppet Users] Applying a resource only if not within a schedule
You could make a notify that also receives the same trigger with an opposite schedule. On Feb 7, 2013, at 2:40 PM, ad wrote:> I have a custom resource type that upgrades a MSI and kicks off a reboot. It uses a schedule parameter (configurable through an ENC) so we can control when the node is allowed to reboot. I''d like to add a notify (or call warn()) if not within the schedule, e.g. "Skipping ensure version of MSI x, not within allowed schedule". > > Any easy way to do this? If not any tips on getting started with a custom function are appreciated. > > Adam > > -- > 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. > >-- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.
ad
2013-Feb-08 22:36 UTC
Re: [Puppet Users] Applying a resource only if not within a schedule
The schedule is a variable defined by our ENC. It varies depending on hostgroup/node. This approach would work but I''d have to write a custom function that knows how to convert a schedule. Adam On Friday, February 8, 2013 2:50:47 PM UTC-6, Jo wrote:> > You could make a notify that also receives the same trigger with an > opposite schedule. > > On Feb 7, 2013, at 2:40 PM, ad wrote: > > I have a custom resource type that upgrades a MSI and kicks off a reboot. > It uses a schedule parameter (configurable through an ENC) so we can > control when the node is allowed to reboot. I''d like to add a notify (or > call warn()) if not within the schedule, e.g. "Skipping ensure version of > MSI x, not within allowed schedule". > > Any easy way to do this? If not any tips on getting started with a custom > function are appreciated. > > Adam > > -- > 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...@googlegroups.com <javascript:>. > To post to this group, send email to puppet...@googlegroups.com<javascript:> > . > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > Jo Rhett > Net Consonance : net philanthropy to improve open source and internet > projects. > > > >-- 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.