class Pvcglue::Packages::AptUpgrade

Public Instance Methods

install!() click to toggle source
# File lib/pvcglue/packages/apt_upgrade.rb, line 14
def install!
  minion.connection.run!(:root, '', 'DEBIAN_FRONTEND=noninteractive apt-get upgrade -y')
  set_minion_state(:apt_upgraded_at, Time.now.utc)
end
installed?() click to toggle source
# File lib/pvcglue/packages/apt_upgrade.rb, line 4
def installed?
  # TODO:  Add a "force" option
  updated_at = get_minion_state(:apt_upgraded_at)
  return false unless updated_at

  # updated_at > Time.now.utc - 8.hours
  # TODO:  Give the user a warning after a period of time
  true
end