Ansible Logging

Hi Kindly clear below queries reg Ansible Logging.

  1. Where does Ansible logs written in Target servers and how to configure if we have the option.
    2.How do I specify to create a seperate log file for every playbook that is run in ansible.cfg in Ansible master server.

A way to generate log file:
Before running ansible-playbook run the following commands to enable logging:

  • Specify the location for the log file.

export ANSIBLE_LOG_PATH=~/ansible.log

  • Enable Debug

export ANSIBLE_DEBUG=True

  • To check that generated log file.

less $ANSIBLE_LOG_PATH

Is there a way to see the log file on the Target server?