I have a very simple Ansible playbook, all the dependencies installed for docker-compose and docker, but I get an error when installing docker-compose. This is the task of my play for installing docker-compose on CentOS7.
#ensure docker-compose and chmod +x /usr/local/bin/docker-compose - name: Ensure docker-compose is installed and available command: curl -L https://github.com/docker/compose/releases/download/1.7.0-rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose - name: Ensure permissions docker-compose command: chmod +x /usr/local/bin/docker-compose
The following error will appear:
TASK: [Ensure docker-compose is installed and available] ********************** failed: [nutrilife-aws] => {"changed": true, "cmd": ["curl", "-L", "https://github.com/docker/compose/releases/download/1.7.0-rc1/docker-compose-`uname", "-s`-`uname", "-m`", ">", "/usr/local/bin/docker-compose"], "delta": "0:00:00.004592", "end": "2016-03-26 14:19:41.852780", "rc": 2, "start": "2016-03-26 14:19:41.848188", "warnings": ["Consider using get_url module rather than running curl"]} stderr: curl: option -s`-`uname: is unknown curl: try 'curl --help' or 'curl --manual' for more information FATAL: all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/home/mmaia/playbook.retry nutrilife-aws : ok=4 changed=0 unreachable=0 failed=1
I kind of got stuck with this simple mistake for hours. I got a command from the standard docker site and tested directly in the shell and it works. I also tried using double quotes to wrap around the command as a command: "curl ...", but that did not change the error.
source share