Say I execute the following.
$ cat test.sh #!/bin/bash echo Hello World exit 0 $ cat Hello.yml --- - hosts: MyTestHost tasks: - name: Hello yourself
There is also other way to generate log file.
Before running ansible-playbook run the following commands to enable logging:
ansible-playbook
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