1 | initial version |
You can use the msg
parameter with the debug
module to display only the output from tasks. For example:
- name: Print output from task
debug:
msg: "{{ output }}"
vars:
output: "{{ shell_command.stdout }}"
become: true
In this example, the output of a shell command is stored in the output
variable, and is then displayed using the msg
parameter of the debug
module. By using this approach, only the output from the specified task will be displayed.