Skip to content

Instantly share code, notes, and snippets.

@pwistrand
Created February 10, 2014 15:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwistrand/8918193 to your computer and use it in GitHub Desktop.
Save pwistrand/8918193 to your computer and use it in GitHub Desktop.
Salt state for unassisted install of Java 7 that works with Debian
#
# How to install automatically Oracle Java 7 under Salt Stack for Debian
#
# References:
# https://gist.github.com/renoirb/6722890
# https://groups.google.com/forum/#!topic/salt-users/ynKNND9qxiI
# http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
#
python-apt:
pkg.latest
python-software-properties:
pkg.latest
oracle-ppa:
pkgrepo.managed:
- humanname: ppa:webupd8team/java
- name: deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
- file: /etc/apt/sources.list.d/webupd8team-java-precise.list
- keyid: EEA14886
- keyserver: keyserver.ubuntu.com
- require_in:
- pkg: oracle-java7-installer
oracle-license-select:
cmd.run:
- unless: which java
- name: '/bin/echo /usr/bin/debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections'
- require_in:
- pkg: oracle-java7-installer
- cmd: oracle-license-seen-lie
oracle-license-seen-lie:
cmd.run:
- name: '/bin/echo /usr/bin/debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections'
- require_in:
- pkg: oracle-java7-installer
oracle-java7-installer:
pkg:
- installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment