From 1f677dfeded1f52dc75c34c93f9ef1d6b3b948be Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 28 Aug 2018 14:43:45 +0200 Subject: o Adding java8 role. --- ansible/roles/java8/handlers/main.yml | 5 +++++ ansible/roles/java8/tasks/main.yml | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ansible/roles/java8/handlers/main.yml create mode 100644 ansible/roles/java8/tasks/main.yml (limited to 'ansible/roles') diff --git a/ansible/roles/java8/handlers/main.yml b/ansible/roles/java8/handlers/main.yml new file mode 100644 index 0000000..0298ff9 --- /dev/null +++ b/ansible/roles/java8/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: update apt cache + become: yes + apt: + update_cache: yes diff --git a/ansible/roles/java8/tasks/main.yml b/ansible/roles/java8/tasks/main.yml new file mode 100644 index 0000000..7115494 --- /dev/null +++ b/ansible/roles/java8/tasks/main.yml @@ -0,0 +1,19 @@ +--- +- name: add java repository + copy: + dest: /etc/apt/sources.list.d/webupd8team-java.list + content: 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main' + notify: apt update + +- name: Install webupd8team key + apt_key: + id: EEA14886 + keyserver: keyserver.ubuntu.com + notify: apt update + +- debconf: name=oracle-java8-installer question=shared/accepted-oracle-license-v1-1 value=true vtype=select + +- meta: flush_handlers + +- name: Install Java + apt: name=oracle-java8-installer state=present -- cgit v1.2.3