Hi,
Before triggering the ansible playbook, i have set this export ANSIBLE_LOG_PATH var to redirect all the output to the log file. But the output is not redirected to this new log and its empty.
Are there any approach to redirect the output other than using ansible.cfg which sets at Global level? Pls share your thoughts on this. Appreciate this help.
Maybe see what is in the debug log. You can do this by adding -vvv (for very verbose) to your ansible-playbook command. Note that this will output to the console, not to the log file.
OS is SUSE linux (SLES12 SP5) .
ansible [core 2.11.12]
i ran my playbook with debug mode. But it didnt show up any useful info about log file path.
ANSIBLE_LOG_PATH=/tmp/ansible.log ansible-playbook testansible.yaml -vvv
ansible-playbook [core 2.11.12]
config file = /etc/ansible/ansible.cfg
configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python3.6/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.6.15 (default, Sep 15 2021, 14:20:42) [GCC]
jinja version = 3.0.3
libyaml = True
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
Skipping callback ‘default’, as we already have a stdout callback.
Skipping callback ‘minimal’, as we already have a stdout callback.
Skipping callback ‘oneline’, as we already have a stdout callback.
PLAYBOOK: testansible.yaml *************************************************************************************************************************************************************
1 plays in testansible.yaml
PLAY [localhost] ***********************************************************************************************************************************************************************
META: ran handlers
TASK [test job] ************************************************************************************************************************************************************************
task path: /home/ansadmin/SHELL_SCRIPT/kernel_vormetric/testansible.yaml:8
ok: [localhost] => {
“msg”: " Test jobs"
}
META: ran handlers
META: ran handlers