Sha256: b83a4704af088a948198ce8fcf363a1e00a23b1f012f4ade3dd0087cb62df4cc

Contents?: true

Size: 1.25 KB

Versions: 5

Compression:

Stored size: 1.25 KB

Contents

#
# How to install automatically Oracle Java 7 under Salt Stack
# 
# Thanks Oracle for complicating things :(
#
# 1. Create a java/ folder in your salt master
# 2. Paste this file in init.sls
# 3. salt '*' state.sls java
#
# Source:
#  * https://github.com/log0ymxm/salt-jvm/blob/master/init.sls
#  * http://architects.dzone.com/articles/puppet-installing-oracle-java
#
oracle-ppa:
  pkgrepo.managed:
    - humanname: WebUpd8 Oracle Java PPA repository
    - ppa: webupd8team/java

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
    - require:
      - pkgrepo: oracle-ppa

adjust_profile:
  file.managed:
    - name: /etc/profile.d/java.sh
    - source: salt://lang/java/etc/profile.d/java.sh
    - user: root
    - group: root
    - mode: 755
    - require:
      - pkg: oracle-java7-installer

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
salted-rails-0.0.9 salt/lang/java/init.sls
salted-rails-0.0.8 salt/lang/java/init.sls
salted-rails-0.0.7 salt/lang/java/init.sls
salted-rails-0.0.6 salt/lang/java/init.sls
salted-rails-0.0.5 salt/lang/java/init.sls