--- - name: Check disk space hosts: all tasks: - name: Check free disk space shell: df -kh / | tail -n1 | awk '{print $5}' register: free - debug: var=free.stdout_lines