From db50e2e9e28d8782d5bf87078547413babc0caa5 Mon Sep 17 00:00:00 2001 From: Dominique Roux Date: Mon, 12 Dec 2016 19:43:15 +0100 Subject: [PATCH] Added parameter --version to define the docker-compose version --- cdist/conf/type/__docker_compose/gencode-remote | 5 ++++- cdist/conf/type/__docker_compose/parameter/default/version | 1 + cdist/conf/type/__docker_compose/parameter/optional | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 cdist/conf/type/__docker_compose/parameter/default/version create mode 100644 cdist/conf/type/__docker_compose/parameter/optional diff --git a/cdist/conf/type/__docker_compose/gencode-remote b/cdist/conf/type/__docker_compose/gencode-remote index 93609172..f22823d3 100644 --- a/cdist/conf/type/__docker_compose/gencode-remote +++ b/cdist/conf/type/__docker_compose/gencode-remote @@ -18,8 +18,11 @@ # along with cdist. If not, see . # +# Variables +version="$(cat "$__object/parameter/version")" + # Download docker-compose file -echo 'curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose' +echo 'curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose' # Change permissions echo 'chmod +x /usr/local/bin/docker-compose' diff --git a/cdist/conf/type/__docker_compose/parameter/default/version b/cdist/conf/type/__docker_compose/parameter/default/version new file mode 100644 index 00000000..f8e233b2 --- /dev/null +++ b/cdist/conf/type/__docker_compose/parameter/default/version @@ -0,0 +1 @@ +1.9.0 diff --git a/cdist/conf/type/__docker_compose/parameter/optional b/cdist/conf/type/__docker_compose/parameter/optional new file mode 100644 index 00000000..088eda41 --- /dev/null +++ b/cdist/conf/type/__docker_compose/parameter/optional @@ -0,0 +1 @@ +version