#!/usr/bin/env bash

if [ ! -f /etc/apt/sources.list.d/ambari.list ]; then
    if [ $test_only -eq 0 ]; then
        wget http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/$ambari_version/ambari.list -O /etc/apt/sources.list.d/ambari.list && \
            apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD && \
            apt-get update
    else
        exit 0
    fi
fi
