You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Basic config forall Debian nodes
class profile::debianapt { # install basic packages class { 'apt': update => { frequency => 'daily',},
purge => { 'sources.list' => true},
}
apt::source { "deb.debian.org-${facts['os']['distro']['codename']}": location => 'http://deb.debian.org/debian/', repos => 'main non-free-firmware non-free contrib', include => {src => true} }# noch mehr apt sources class { 'unattended_upgrades': auto => { clean => 'always', remove => true }, enable => true, origins => [ 'origin=${distro_id},suite=${distro_codename}', 'origin=${distro_id},suite=${distro_codename}-security', 'origin=${distro_id},suite=${distro_codename}-backports', 'origin=${distro_id},suite=${distro_codename}-updates', ], remove_new_unused_deps => true, }}
What are you seeing
error about duplicate declaration when trying to run puppet agent --test
What behaviour did you expect instead
successfully configuring unattended upgrades
Output log
root:/etc/puppet/code/environments/production# puppet agent --test
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Package[unattended-upgrades] is already declared at (file: /etc/puppet/code/environments/production/modules/profile/manifests/debianapt.pp, line: 16); cannot redeclare (file: /etc/puppet/code/environments/production/modules/unattended_upgrades/manifests/init.pp, line: 50) (file: /etc/puppet/code/environments/production/modules/unattended_upgrades/manifests/init.pp, line: 50, column: 3) on node puppet.jmbfountain.de
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Any additional information you'd like to impart
I'm fairly new to both Puppet and Ruby, so this might just be an error I made and don't know how to correctly google.
I installed the module using puppet module install puppet-unattended_upgrades --version 8.0.0 and declared it using
class{ 'unattended_upgrades': age => { 'max' => 10 },
}
as shown in the README.
However, if I then try to roll this out to an agent, it says it can't declare unattended_upgrades in the init.pp of the unattended_Upgrades module because it's already declared.
The text was updated successfully, but these errors were encountered:
What is the full error message? It should give you filenames and line numbers. Seems like this is coming from your code, because the package resource is only declared once in this module.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
error about duplicate declaration when trying to run
puppet agent --test
What behaviour did you expect instead
successfully configuring unattended upgrades
Output log
Any additional information you'd like to impart
I'm fairly new to both Puppet and Ruby, so this might just be an error I made and don't know how to correctly google.
I installed the module using
puppet module install puppet-unattended_upgrades --version 8.0.0
and declared it usingas shown in the README.
However, if I then try to roll this out to an agent, it says it can't declare unattended_upgrades in the init.pp of the unattended_Upgrades module because it's already declared.
The text was updated successfully, but these errors were encountered: