Issue #3448 has been updated by Jesse Wolfe.

Target version changed from Rowlf to queued


----------------------------------------
Bug #3448: Invalid values can be passed to purge
http://projects.puppetlabs.com/issues/3448

Author: Jaroslaw Wozniak
Status: Needs more information
Priority: Low
Assigned to: 
Category: purge
Target version: queued
Affected version: 0.25.4
Keywords: 
Branch: 


Puppet doesn't complain if you pass an invalid value to purge. If you use 
something other than 'true' or make a type like 'ture', puppet will evaluate it 
to 'false' and won't purge.

I would expect an error:

 Invalid value "asdfafd". Valid values are true, false


$ pi resources
<snip>
- purge
    Purge unmanaged resources.  This will delete any resource
    that is not specified in your configuration
    and is not required by any specified resources.  Valid values are
   *true, false*.
</snip>


$ cat /etc/pupppet/manifests/hosts.pp

resources { 'host':
        purge => **asdfafd**,
}

host { 'localhost.localdomain':
    host_aliases => ['localhost'],
    ip => '127.0.0.1',
    ensure => 'present',
    target => '/etc/hosts'
}

No errors:

puppet --trace --verbose --debug /etc/puppet/manifests/hosts.pp 

debug: Failed to load library 'selinux' for feature 'selinux'
debug: Creating default schedules
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring 
File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction -612612248 with 0 changes
debug: Prefetching parsed resources for host
info: Applying configuration version '1269793265'
debug: Finishing transaction -612720208 with 0 changes

puppet --parseonly --debug --verbose /etc/puppet/manifests/hosts.pp
puppet --version
0.25.4


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to