Skip to content

Commit

Permalink
#149 fix default
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Green committed Aug 20, 2019
1 parent 1f82647 commit a565681
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@
notify => Exec[$fact_exec],
}

$autoremove_ensure = $apt_autoremove ? {
true => 'present',
default => 'absent'
}

$patch_window_ensure = ($ensure == 'present' and $patch_window ) ? {
true => 'file',
default => 'absent'
Expand Down Expand Up @@ -325,7 +330,7 @@

if $facts['os']['family'] == 'Debian' and $apt_autoremove == true {
cron { 'Run apt autoremove on reboot':
ensure => $ensure,
ensure => $autoremove_ensure,
command => 'apt-get -y autoremove',
user => $patch_cron_user,
special => 'reboot',
Expand Down

0 comments on commit a565681

Please sign in to comment.