def changed(*a, **kw):
 item = a[0]
 if (type(item) != dict):
  raise errors.AnsibleFilterError('|changed expects a dictionary')
 if (not ('changed' in item)):
  changed = False
  if (('results' in item) and (type(item['results']) == list) and (type(item['results'][0]) == dict)):
   for result in item['results']:
    changed = (changed or result.get('changed', False))
 else:
  changed = item.get('changed', False)
 return changed

def changed ( * a , ** kw ) : item = a [ 0 ] if ( type ( item ) != dict ) : raise errors . AnsibleFilterError ( '|changed expects a dictionary' ) if ( not ( 'changed' in item ) ) : changed = False if ( ( 'results' in item ) and ( type ( item [ 'results' ] ) == list ) and ( type ( item [ 'results' ] [ 0 ] ) == dict ) ) : for result in item [ 'results' ] : changed = ( changed or result . get ( 'changed' , False ) ) else : changed = item . get ( 'changed' , False ) return changed
test if task result yields changed .