Ansible how to get output as variable without brackets and u

Solution 1:

The results that you got returned is a list of lists. So a list of rows, with a list of the cells within that row.

Try something like this.

- name: echo
  shell: echo {{ smth.msg[0][0] }} > /tmp/test