My ansible playbook running throguh Oracle Linux Automation Manger gives me logs after the execution of tasks instead of in realtime for the below playbook.
---
- name: Stop Weblogic
hosts: "{{server}}"
gather_facts: no
remote_user: awx
vars_files:
- vars.yml
- "{{server}}.yml"
tasks:
- name: Run the weblogic shutdown command
command: sudo su - oracle -c 'sh /home/oracle/wip/new/wls_stop.sh'
register: shutdown_output
become: true
- name: Display weblogic shutdown output
debug:
msg: " the shutdown output is {{ shutdown_output.stdout }}"
When I run this command sh /home/oracle/wip/new/wls_stop.sh
directly it gives me logs line by line logs but when running through playbook it shows at the end of the task.