dev/modules/sysconfig/manifests/sys_upgrade.pp
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 18:34:46 +0200
changeset 655 cac6781d8b7f
parent 587 a1aa29e7809f
permissions -rw-r--r--
add the file settings_dev.py to be cleaned, set cache timeout to 0 (i.e. disable cache for tests)

class sysconfig::sys_upgrade {

  exec {
    'apt_get_update_sysconfig':
      command     => '/usr/bin/apt-get update',
      timeout     => 2400,
      returns     => [ 0, 100 ];
#      refreshonly => true;
    'sys-upgrade':
      command   => '/usr/bin/apt-get upgrade -y',
      timeout => 0,
      require   => Exec['apt_get_update_sysconfig'];
    'sys-dist-upgrade':
      command   => '/usr/bin/apt-get dist-upgrade -y',
      timeout => 0,
      require   => Exec['apt_get_update_sysconfig'];
  }

  Exec['sys-upgrade'] -> Exec['sys-dist-upgrade']
  
}