class Pvcglue::Packages::UnattendedUpgrades

Public Instance Methods

install!() click to toggle source
# File lib/pvcglue/packages/unattended_upgrades.rb, line 8
def install!
  connection.write_to_file_from_template(:root, '20auto-upgrades.erb', '/etc/apt/apt.conf.d/20auto-upgrades')
  connection.write_to_file_from_template(:root, '50unattended-upgrades.erb', '/etc/apt/apt.conf.d/50unattended-upgrades')
end
installed?() click to toggle source
# File lib/pvcglue/packages/unattended_upgrades.rb, line 4
def installed?
  get_minion_state(:installed_unattended_upgrades_at)
end
post_install_check?() click to toggle source
# File lib/pvcglue/packages/unattended_upgrades.rb, line 13
def post_install_check?
  connection.run!(:root, '', 'service unattended-upgrades restart')
  set_minion_state(:installed_unattended_upgrades_at, Time.now.utc)
  true
end