- name: Get Log  
  set_fact:  
    match: "{{ 'foobar' | regex_search( 'foo' ) }}"  
  
- debug:  
    var: match