diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-04-12 15:23:26 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-04-12 15:23:26 -0700 |
| commit | 0c6f50cbc1409cb9e31f4f512a7ff27d4b4c5167 (patch) | |
| tree | 89a4411933ef54e847d7d64de96de9814604639f /lib/puppet | |
| parent | 789aad8dd692e1bac5748e16e0acdfada2d197c7 (diff) | |
| download | puppet-0c6f50cbc1409cb9e31f4f512a7ff27d4b4c5167.tar.gz puppet-0c6f50cbc1409cb9e31f4f512a7ff27d4b4c5167.tar.xz puppet-0c6f50cbc1409cb9e31f4f512a7ff27d4b4c5167.zip | |
(#775) Don't require command when removing cron entries
Previously, if a cron entry had "ensure => absent" with no command specified
and the crontab contained unmanaged entries, the entry would fail to be removed
and every other cron entry in the catalog after it would be duplicated.
Paired-With: Jesse Wolfe
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/provider/cron/crontab.rb | 8 | ||||
| -rwxr-xr-x | lib/puppet/type/cron.rb | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/puppet/provider/cron/crontab.rb b/lib/puppet/provider/cron/crontab.rb index 8a347b331..a554363c8 100755 --- a/lib/puppet/provider/cron/crontab.rb +++ b/lib/puppet/provider/cron/crontab.rb @@ -11,13 +11,7 @@ tab = case Facter.value(:operatingsystem) - Puppet::Type.type(:cron).provide( - :crontab, - :parent => Puppet::Provider::ParsedFile, - :default_target => ENV["USER"] || "root", - - :filetype => tab -) do +Puppet::Type.type(:cron).provide(:crontab, :parent => Puppet::Provider::ParsedFile, :default_target => ENV["USER"] || "root", :filetype => tab) do commands :crontab => "crontab" text_line :comment, :match => %r{^#}, :post_parse => proc { |record| diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index 4f6ea733c..5083ca556 100755 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -395,7 +395,7 @@ Puppet::Type.newtype(:cron) do unless ret case name when :command - devfail "No command, somehow" + devfail "No command, somehow" unless @parameters[:ensure].value == :absent when :special # nothing else |
