Sep 15, 2016, 16:14

docker-compose recipe for ansible

- name: install docker-compose
  become: yes
  file: path=/opt/bin state=directory mode=0755

- name: get docker-compose url
  shell: curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'
  register: url_info

- name: fetch docker-compose
  become: yes
  get_url: url="{{url_info.stdout}}" dest=/opt/bin/docker-compose mode=0755
Share