summaryrefslogtreecommitdiff
path: root/puppet/modules/site_apt/manifests/dist_upgrade.pp
blob: f129dd7320243bc30c36a1ff7a8406a42fae2415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class site_apt::dist_upgrade {

  if $::apt_running == 'true' { 
    fail ('apt-get is running in background - Please wait until it finishes. Exiting.')
  } else {
    exec{'initial_apt_update':
      command     => '/usr/bin/apt-get update && /usr/bin/apt-get  autoclean',
      refreshonly => false,
    }
    exec{'initial_apt_dist_upgrade':
      command     => "/usr/bin/apt-get -q -y -o 'DPkg::Options::=--force-confold'  dist-upgrade",
      refreshonly => false,
    }
  }
}