--- - hosts: all sudo: yes tasks: - shell: docker-compose --version register: compose ignore_errors: true - shell: curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose when: compose|failed - shell: chmod +x /usr/local/bin/docker-compose