How to capture varnishlogs in ansible

how to capture varnishlogs run time after curl req is sent

A

  1. i tired this way
  • name: varnishlog in T1
    hosts: host1
    become: yes
    tasks:

    • name: varnishlog
      shell: varnishlog
      async: 120
      poll: 0
      register: varnishlog_output
  • name: curl req in T2
    hosts: host2
    become: no
    tasks:

  • name: Check if varnishlog is complete
    async_status:
    jid: “{{ varnishlog_output.ansible_job_id }}”
    register: job_result
    until: job_result.finished
    delay: 10
    retries: 3

still unable to get varnishlog run time