def additions_installed(name, reboot=False, upgrade_os=False):
 ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}
 current_state = __salt__['vbox_guest.additions_version']()
 if current_state:
  ret['result'] = True
  ret['comment'] = 'System already in the correct state'
  return ret
 if __opts__['test']:
  ret['comment'] = 'The state of VirtualBox Guest Additions will be changed.'
  ret['changes'] = {'old': current_state, 'new': True}
  ret['result'] = None
  return ret
 new_state = __salt__['vbox_guest.additions_install'](reboot=reboot, upgrade_os=upgrade_os)
 ret['comment'] = 'The state of VirtualBox Guest Additions was changed!'
 ret['changes'] = {'old': current_state, 'new': new_state}
 ret['result'] = bool(new_state)
 return ret

def additions_installed ( name , reboot = False , upgrade_os = False ) : ret = { 'name' : name , 'changes' : { } , 'result' : False , 'comment' : '' } current_state = __salt__ [ 'vbox_guest.additions_version' ] ( ) if current_state : ret [ 'result' ] = True ret [ 'comment' ] = 'System already in the correct state' return ret if __opts__ [ 'test' ] : ret [ 'comment' ] = 'The state of VirtualBox Guest Additions will be changed.' ret [ 'changes' ] = { 'old' : current_state , 'new' : True } ret [ 'result' ] = None return ret new_state = __salt__ [ 'vbox_guest.additions_install' ] ( reboot = reboot , upgrade_os = upgrade_os ) ret [ 'comment' ] = 'The state of VirtualBox Guest Additions was changed!' ret [ 'changes' ] = { 'old' : current_state , 'new' : new_state } ret [ 'result' ] = bool ( new_state ) return ret
ensure that the virtualbox guest additions are installed .