Skip to content

Instantly share code, notes, and snippets.

@cemmurphy
Created May 28, 2014 06:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cemmurphy/6e7771d71ca9fcec0348 to your computer and use it in GitHub Desktop.
Save cemmurphy/6e7771d71ca9fcec0348 to your computer and use it in GitHub Desktop.
Install Oracle Java 7 with Salt Stack on Debian or Ubuntu
# -*- coding: utf-8; mode:yaml; tab-width:2; indent-tabs-mode:nil; -*-
# vim: syntax=yaml ts=2 sw=2 sts=2 et si ai
#
# Install Oracle Java 7 with Salt Stack on Debian or Ubuntu
#
# References:
# https://gist.github.com/renoirb/6722890
# https://gist.github.com/pwistrand/8918193
# 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:
- installed
python-software-properties:
pkg:
- installed
oracle-java-ppa:
pkgrepo:
- managed
- humanname: WebUpd8 Oracle Java PPA repository
{% if grains['os'] == 'Debian' %}
- 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
{% elif grains['os'] == 'Ubuntu' %}
- ppa: webupd8team/java
{% endif %}
oracle-java-license-autoaccept:
debconf:
- set
- name: oracle-java7-installer
- data:
'shared/accepted-oracle-license-v1-1': {'type': 'boolean', 'value': True}
oracle-java7-installer:
pkg:
- installed
- require:
- debconf: oracle-java-license-autoaccept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment