From 3de781d0488e3ef4e61902050b02635035cfcac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Grill?= Date: Wed, 7 Sep 2016 22:16:50 +0200 Subject: [PATCH] Fix containerization + Make APT-Package name more generic with varialbes (#60) * Make the version of mesos configurable as a whole * Add docker to mesos_containerizers --- defaults/main.yml | 3 ++- tasks/Debian.yml | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e9c3448..63b5316 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,6 +7,7 @@ mesos_package_version: "0.2.70" mesosphere_apt_url: "http://repos.mesosphere.com/{{ ansible_distribution | lower }}" mesos_os_distribution: "{{ ansible_distribution | lower }}" mesos_os_version: "{{ ansible_distribution_version.split('.') | join('') }}" +mesos_apt_package: "mesos={{ mesos_version }}-{{ mesos_package_version }}.{{ mesos_os_distribution }}{{ mesos_os_version }}" # RedHat: EPEL and Mesosphere yum repositories URL epel_repo: "https://dl.fedoraproject.org/pub/epel/{{ os_version_major }}/{{ ansible_architecture }}/{{ epel_releases[os_version_major] }}" @@ -29,7 +30,7 @@ mesos_owner: root mesos_group: root # Containerizer -mesos_containerizers: "mesos" +mesos_containerizers: "docker,mesos" mesos_executor_timeout: "5mins" mesos_option_prefix: "MESOS_" diff --git a/tasks/Debian.yml b/tasks/Debian.yml index d6e4b1c..9c7cca1 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -3,15 +3,14 @@ apt_key: id=E56151BF keyserver=keyserver.ubuntu.com state=present - name: Add mesosphere repo - apt_repository: repo='deb {{ mesosphere_apt_url }} {{ansible_distribution_release|lower}} main' state=present + apt_repository: repo='deb {{ mesosphere_apt_url }} {{ ansible_distribution_release | lower }} main' state=present - name: Install Debian OS packages - apt: pkg={{item}} state=present update_cache=yes + apt: pkg={{ item }} state=present update_cache=yes with_items: - wget - curl - unzip - python-setuptools - python-dev - - mesos={{ mesos_version }}-{{ mesos_package_version }}.{{ mesos_os_distribution }}{{ mesos_os_version }} - + - "{{ mesos_apt_package }}"