4ebb7d463e
Currently, setting the $custom_preferences variable to false fails because of the /etc/apt/preferences concatenated_file being re-defined. Fix this by setting dependencies on the resource only when we expect to create the /etc/apt/preferences file. Also, since there is no "ensure" parameter to concatenated_file, use a simple file resource to ensure that it is removed. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
18 lines
460 B
Puppet
18 lines
460 B
Puppet
class apt::unattended_upgrades {
|
|
package{'unattended-upgrades':
|
|
ensure => present,
|
|
require => undef,
|
|
}
|
|
|
|
apt_conf { "50unattended-upgrades":
|
|
source => ["puppet:///modules/site-apt/50unattended-upgrades",
|
|
"puppet:///modules/apt/50unattended-upgrades" ],
|
|
require => Package['unattended-upgrades'],
|
|
}
|
|
|
|
if $custom_preferences != false {
|
|
Apt_conf["50unattended-upgrades"] {
|
|
before => Concatenated_file[apt_config],
|
|
}
|
|
}
|
|
}
|