From bedaa43a30f2d343a1b899690a9825a80f19779d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 30 Sep 2016 18:37:48 +0200 Subject: [PATCH] library/roles/hadoop/HDP: Role that installs the Nortonworks HDP ambari packages. In future it will do some basic initialization too. --- hadoop/HDP/defaults/main.yml | 7 +++++++ hadoop/HDP/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 hadoop/HDP/defaults/main.yml create mode 100644 hadoop/HDP/tasks/main.yml diff --git a/hadoop/HDP/defaults/main.yml b/hadoop/HDP/defaults/main.yml new file mode 100644 index 00000000..02d7be9f --- /dev/null +++ b/hadoop/HDP/defaults/main.yml @@ -0,0 +1,7 @@ +--- +# See http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.1.0/bk_ambari-installation/content/download_the_ambari_repo_ubuntu14.html +hdp_ambari_install: False +hdp_ambari_repo_url: 'http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.4.1.0/ambari.list' +hdp_ambari_repo_key: 'B9733A7A07513CAD' + +ambari_use_separate_postgres_db: False diff --git a/hadoop/HDP/tasks/main.yml b/hadoop/HDP/tasks/main.yml new file mode 100644 index 00000000..e69f10f1 --- /dev/null +++ b/hadoop/HDP/tasks/main.yml @@ -0,0 +1,18 @@ +--- +- block: + - name: apt key for the Hortonworks ambari repository + apt_key: keyserver=keyserver.ubuntu.com id={{ hdp_ambari_repo_key }} state=present + + - name: Install the Hortonworks ambari repository + get_url: url={{ hdp_ambari_repo_url }} dest=/etc/apt/sources.list.d/ambari.list + register: ambari_repo + + - name: Update the apt cache + apt: update_cache=yes + when: ( ambari_repo | changed ) + + - name: Install the ambari server + apt: pkg=ambari-server state=latest + + when: hdp_ambari_install + tags: [ 'hdp', 'hadoop', 'ambari' ]