I have a very simple Ansible playbook, all dependencies installed for docker-compose and docker but I get an error when installing docker-compose, this is the task on my playbook to install docker-compose in a CentOS7 environment.
#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 appears:
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 am kind of stuck with this simple error for a couple of hours. I got the command from standard docker site and tested directly in the shell and it works. I have also tried using double quotes to wrap around the command like command: "curl ..." but it didn't change the error.