Skip to content

Instantly share code, notes, and snippets.

@h1kkan
Created January 28, 2016 09:20
Show Gist options
  • Save h1kkan/e67f8721fc2d1f010cf6 to your computer and use it in GitHub Desktop.
Save h1kkan/e67f8721fc2d1f010cf6 to your computer and use it in GitHub Desktop.
Salt state to install java 8 (Oracle repo from Webupd8team)
# Add the oracle jvm ppa, and install java8
# https://launchpad.net/~webupd8team/+archive/ubuntu/java
# This is used for all java installs
# This is slightly retooled due to a bug in Salt 2014.7 (Helium)
# ... and to not use cmd.run
oracle-ppa:
pkgrepo.managed:
- humanname: WebUpd8 Oracle Java PPA repository
- name: deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
- dist: trusty
- file: /etc/apt/sources.list.d/webupd8team-java.list
- keyid: EEA14886
- keyserver: keyserver.ubuntu.com
oracle-license-select:
debconf.set:
- name: oracle-java8-installer
- data:
'shared/accepted-oracle-license-v1-1': {'type': 'boolean', 'value': 'true'}
oracle-java8-installer:
pkg:
- installed
- require:
- pkgrepo: oracle-ppa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment