Since a recent Puppet  update, my logs contain a lot of these warnings:

2017-08-21 14:03:20,146 WARN [qtp2051525912-14813] [puppetserver] Puppet 
> Attempt to override an already evaluated resource, defined at 
> /etc/puppetlabs/code/environments/production/modules/puppet/manifests/collections.pp:45,
>  
> with new values at 
> /etc/puppetlabs/code/environments/production/modules/puppet/manifests/collections.pp:40



The code leading to these warnings is this:

        if $::operatingsystem == 'Debian' {


>             $remove_packages = [

                'facter',

                'hiera',

                'puppet',

                'puppet-common'

            ]


>             linux::package { $remove_packages: ensure => purged }


>             Linux::Package['puppet-agent'] {

                require => Linux::Package[$remove_packages],

            }

        }


>         linux::package { 'puppet-agent':

            ensure  => installed,

        }

 


I found PUP-6290 <https://tickets.puppetlabs.com/browse/PUP-6290>, which 
seems related to this, but I am not sure the use case described in that 
ticket is the same. Also, I don't think that adding a 'require' metaparam 
to an already evaluated resource should require a re-evaluation of the 
resource body.

If my pattern of conditionally adding to a resource's parameters is wrong, 
how should I go about this?

Best regards,
Martijn.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e3f1b536-8ac3-4d10-bbbf-088e8b9784c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to