Skip to content

Instantly share code, notes, and snippets.

@arnaldopereira
Created February 2, 2016 18:59
Show Gist options
  • Save arnaldopereira/d813b2ff0eb75e5591af to your computer and use it in GitHub Desktop.
Save arnaldopereira/d813b2ff0eb75e5591af to your computer and use it in GitHub Desktop.
Ansible role to install oracle java 7
---
- name: install java 7 dependencies
apt: name=python-software-properties state=latest update_cache=yes
- name: add java repository
apt_repository: repo='ppa:webupd8team/java'
- name: auto accept license for java
action: shell echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
- name: update APT cache
apt: update_cache=yes
- name: install packages
apt: name={{ item }} state=latest
with_items:
- oracle-java7-installer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment