diff options
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/roles/java8/handlers/main.yml | 5 | ||||
-rw-r--r-- | ansible/roles/java8/tasks/main.yml | 19 |
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 |