--- - hosts: all tasks: - name: Check uptime of the remote host shell: uptime register: command_output - debug: var: command_output.stdout_lines