def computer_desc(name):
 name = str(name)
 ret = {'name': name, 'changes': {}, 'result': True, 'comment': "Computer description already set to '{0}'".format(name)}
 before_desc = __salt__['system.get_computer_desc']()
 if (before_desc == name):
  return ret
 if __opts__['test']:
  ret['result'] = None
  ret['comment'] = "Computer description will be changed to '{0}'".format(name)
  return ret
 result = __salt__['system.set_computer_desc'](name)
 if (result['Computer Description'] == name):
  ret['comment'] = "Computer description successfully changed to '{0}'".format(name)
  ret['changes'] = {'old': before_desc, 'new': name}
 else:
  ret['result'] = False
  ret['comment'] = "Unable to set computer description to '{0}'".format(name)
 return ret

def computer_desc ( name ) : name = str ( name ) ret = { 'name' : name , 'changes' : { } , 'result' : True , 'comment' : "Computer description already set to '{0}'" . format ( name ) } before_desc = __salt__ [ 'system.get_computer_desc' ] ( ) if ( before_desc == name ) : return ret if __opts__ [ 'test' ] : ret [ 'result' ] = None ret [ 'comment' ] = "Computer description will be changed to '{0}'" . format ( name ) return ret result = __salt__ [ 'system.set_computer_desc' ] ( name ) if ( result [ 'Computer Description' ] == name ) : ret [ 'comment' ] = "Computer description successfully changed to '{0}'" . format ( name ) ret [ 'changes' ] = { 'old' : before_desc , 'new' : name } else : ret [ 'result' ] = False ret [ 'comment' ] = "Unable to set computer description to '{0}'" . format ( name ) return ret
manage the computers description field name the desired computer description .