--- - hosts: default roles: - ansible-docker-ubuntu tasks: - name: Check docker version command: docker --version register: result changed_when: false - debug: var: result.stdout