summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/playbooks/pre.yml2
-rwxr-xr-xtools/setup_Debian.sh12
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/playbooks/pre.yml b/tests/playbooks/pre.yml
index e721d8859..526b830fa 100644
--- a/tests/playbooks/pre.yml
+++ b/tests/playbooks/pre.yml
@@ -1,5 +1,7 @@
---
- hosts: all
+ roles:
+ - bindep
tasks:
- name: Create dir for kolla logs
file:
diff --git a/tools/setup_Debian.sh b/tools/setup_Debian.sh
index 97cd8d8e2..65ffc25f5 100755
--- a/tools/setup_Debian.sh
+++ b/tools/setup_Debian.sh
@@ -54,18 +54,20 @@ function setup_disk {
# (SamYaple)TODO: Remove the path overriding
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-. /etc/lsb-release
-
# Setup Docker repo and add signing key
+distro_id=$(lsb_release -is)
+distro_id=${distro_id,,}
+distro_codename=$(lsb_release -cs)
+
sudo apt-get update
sudo apt-get -y install apt-transport-https
-sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+sudo add-apt-repository "deb https://download.docker.com/linux/${distro_id} ${distro_codename} stable"
+curl -fsSL https://download.docker.com/linux/${distro_id}/gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install --no-install-recommends docker-ce
sudo service docker stop
-if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then
+if [[ ${distro_codename} == "trusty" ]]; then
sudo apt-get -y install --no-install-recommends btrfs-tools
setup_disk
echo "DOCKER_OPTS=\"-s btrfs --insecure-registry 0.0.0.0/0\"" | sudo tee /etc/default/docker