Issue #17288 has been updated by eric sorenson.

Status changed from Unreviewed to Accepted
Assignee set to Ben Ford

Yup that's a bug. Got a patch?
----------------------------------------
Bug #17288: a file resource will GET the source, even when ensure is set to 
absent.
https://projects.puppetlabs.com/issues/17288#change-84065

Author: Ben Ford
Status: Accepted
Priority: Normal
Assignee: Ben Ford
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


This is kind of a nonsense situation, except for code such as this:

    define userconfig::p4include (
      $ensure = present,
      $source = 'puppet:///modules/userconfig/p4include'
    ) {
      # This will cut down on extra network requests
      $real_source = $ensure ? {
        absent  => undef,
        default => $source,
      }
    
      file { "/home/${name}/.p4include":
        ensure  => $ensure,
        source  => $real_source,
      }
    }

Without the selector, the source is always queried, causing extra overhead, and 
failing if the source doesn't exist. Even if you're ensuring absent.


-- 
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