Skip to content

Instantly share code, notes, and snippets.

@ebuildy
Created May 11, 2020 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebuildy/798f31413050689a9f3d242ee450f8d6 to your computer and use it in GitHub Desktop.
Save ebuildy/798f31413050689a9f3d242ee450f8d6 to your computer and use it in GitHub Desktop.
Install docker-compose via Ansible
---
- hosts: recette
become: yes
become_user: root
tasks:
- name: "Get Linux uname's"
command: "uname -{{ item }}"
register: unames
with_items: ["s", "m"]
- set_fact:
uname_s: "{{ unames.results[0].stdout }}"
uname_m: "{{ unames.results[1].stdout }}"
- name: Install docker-compose
get_url:
url : https://github.com/docker/compose/releases/download/1.25.4/docker-compose-{{ uname_s }}-{{ uname_m }}
dest: /usr/bin/docker-compose
mode: 'u+x,g+x'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment