Issue #12653 has been updated by John Julien.

This bug appears to only trigger when the schedule and define are part of a 
class rather than an in-line manifest like the one Chris attached.

The schedule is ignored in the following code:

<pre><code>class myclass {
  schedule { 'never':
    period => never,
  }

  define foodefine::sub ($foomessage) {
    notify { "FOODEFINE: $name $foomessage": }
  }

  foodefine::sub { "should not execute":
    foomessage => 'never',
    schedule => 'never',
  }
}

include myclass
</code></pre>

----------------------------------------
Bug #12653: schedule metaparameter ignored in defined type
https://projects.puppetlabs.com/issues/12653#change-91121

* Author: Chip Schweiss
* Status: Needs More Information
* Priority: Normal
* Assignee: 
* Category: metaparameters
* Target version: 
* Affected Puppet version: 2.6.12
* Keywords: define, schedule
* Branch: 
----------------------------------------
I have defined:
<pre>
define yumgroup($ensure = "present", $optional = false) {
    case $ensure {
        present,installed: {
            $pkg_types_arg = $optional ? {
                true => 
"--setopt=group_package_types=optional,default,mandatory",
                default => ""
            }
            exec { "Installing $name yum group":
                command => "yum -y groupinstall $pkg_types_arg $name",
                unless => "yum -y groupinstall $pkg_types_arg $name 
--downloadonly",
                timeout => 600,
                require => Package["yum-plugin-downloadonly"];
            }
        }
    }
}   
</pre>
and call it with: 

<pre>
yumgroup {
    $centos6_pkg_groups:
    ensure => present,
    schedule => 'daily',
}
</pre>

The schedule is ignored and runs every time.  If I add the schedule to the exec 
in the defined method it works as expected. 
 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to