aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/java8
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-08-28 14:43:45 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-08-28 14:43:59 +0200
commit1f677dfeded1f52dc75c34c93f9ef1d6b3b948be (patch)
tree93a458fe6bc5b656865c00395e3062eb72cefb92 /ansible/roles/java8
parent995ff0d77def7bffcd419ed8a6a87cf757bb7782 (diff)
downloadinfra-1f677dfeded1f52dc75c34c93f9ef1d6b3b948be.tar.gz
infra-1f677dfeded1f52dc75c34c93f9ef1d6b3b948be.tar.bz2
infra-1f677dfeded1f52dc75c34c93f9ef1d6b3b948be.tar.xz
infra-1f677dfeded1f52dc75c34c93f9ef1d6b3b948be.zip
o Adding java8 role.
Diffstat (limited to 'ansible/roles/java8')
-rw-r--r--ansible/roles/java8/handlers/main.yml5
-rw-r--r--ansible/roles/java8/tasks/main.yml19
2 files changed, 24 insertions, 0 deletions
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