Last active
July 1, 2017 08:18
-
-
Save labynocle/6a3269f70329c05a3defec7c0e7fe15d to your computer and use it in GitHub Desktop.
Ansible for java 8 on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Add Java repository | |
apt_repository: | |
repo: "ppa:webupd8team/java" | |
become: yes | |
- name: Force apt cache update | |
apt: | |
update_cache: yes | |
become: yes | |
- name: Set Java 8 License as selected | |
shell: "/bin/echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections" | |
become: yes | |
- name: Set Java 8 License as seen | |
shell: "/bin/echo debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections" | |
become: yes | |
- name: Install Oracle Java 8 | |
apt: | |
name: "{{item}}" | |
state: latest | |
with_items: | |
- oracle-java8-installer | |
- ca-certificates | |
- oracle-java8-set-default | |
become: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment