By default, ansible.cfg has log_path commented out, like this.
#log_path = /var/log/ansible.log
When commented out, Ansible will log events to the machines syslog (system log daemon). As an example, syslog may write Ansible events to the /var/log/messages file.
Mar 22 12:55:08 [localhost] ansible-command: Invoked with creates=None executable=None _uses_shell=True strip_empty_ends=True _raw_params=ping -c4 was2.software.eng.us removes=None argv=None warn=True chdir=None stdin_add_newline=True stdin=None
To configure Ansible to log events to it's own log file, one option is to uncomment the log_path line. In this example, Ansible will start to log events to /var/log/ansible.log.
log_path = /var/log/ansible.log
Or you could set a temporary log path using the ANSIBLE_LOG_PATH variable.
Create the log file and update the permission so that it has the write permission for user, group and other.
touch /var/log/ansible.log chmod 0666 /var/log/ansible.log
You will probably also want to configure logrotate to rotate the log files.