GithubHelp home page GithubHelp logo

malk / ansible-java8-oracle Goto Github PK

View Code? Open in Web Editor NEW
65.0 2.0 44.0 17 KB

Ansible role to Install the oracle Java8 on ubuntu or mint using the webupd8 ppa

License: GNU General Public License v3.0

ansible-java8-oracle's Introduction

ansible-java8-oracle

Ansible role to Install the Oracle Java8 webupd8 ppa.

Should work on Ubuntu or Mint. Debian has no ppa suport AFAIK.

Licence is auto-accepted (no prompt) and the whole thing is idempotent (executing it several times will not do unneeded steps again).

No usage of 'shell:' only ansible commands.

Requirements

None.

Role Variables

None.

Dependencies

None.

Example Playbook

	- hosts: servers
	  roles:
		- ansible-java8-oracle

License

GPL V3, but that is interesting on fork only, you can use it at will.

ansible-java8-oracle's People

Contributors

ckreal avatar malk avatar optimuspaul avatar palexander avatar wzooff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ansible-java8-oracle's Issues

playbook fails on ubuntu 14.04

thanks for this helpful playbook. I tried running it on Ubuntu 14.04 LTS and got the following errors:

failed: [10.0.2.43] => {"cmd": "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 7B2C3B0889BF5709A105D03AC2518248EEA14886", "failed": true, "rc": 2}
stderr: gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: no writable keyring found: eof
gpg: error reading `[stream]': general error
gpg: Total number processed: 0

stdout: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.5jwpbSRNqt --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 7B2C3B0889BF5709A105D03AC2518248EEA14886

msg: gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: no writable keyring found: eof
gpg: error reading `[stream]': general error
gpg: Total number processed: 0

FATAL: all hosts have already failed -- aborting

install fails on ubuntu 14.04 "Could not replace file"

I am attempting to install java8 on some AWS instances running ubuntu14.04.

Ansible 2.0.1

The install fails when trying to alter the sources.list
Other recipes run fine on this host.

My playbook main looks like this:

- hosts: master
  sudo: yes
  roles:
    - ansible-java8-oracle
TASK [ansible-java8-oracle : Add Oracle Java Repository] ***********************
fatal: [ip-192-168-16-111.vpc.my.domain]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "{\"msg\": \"Could not replace file: /etc/apt/.sources.list-x0ooTA to /etc/apt/sources.list: [Errno 1] Operation not permitted\", \"failed\": true, \"invocation\": {\"module_args\": {\"install_python_apt\": true, \"repo\": \"ppa:webupd8team/java\", \"state\": \"present\", \"update_cache\": true, \"mode\": 420, \"validate_certs\": true}}}\r\nException OSError: (2, 'No such file or directory', '/etc/apt/.ansible_tmp5wIypOsources.list') in <bound method _TemporaryFileWrapper.__del__ of <closed file '<fdopen>', mode 'w+b' at 0x7f963b8e4d20>> ignored\r\n", "msg": "MODULE FAILURE", "parsed": false}

Workaround for error Invalid repository ppa:webupd8team/java

Note that I had to add the repository differently because "apt_repository: repo='ppa:webupd8team/java' state=present" threw an error saying that it was an invalid repository. I got the id from the webupd8team/java website

- name: Add an apt key by id from a keyserver
  become: yes
  apt_key:
    keyserver: keyserver.ubuntu.com
    id: 7B2C3B0889BF5709A105D03AC2518248EEA14886
    state: present
    
- name: Add Oracle Java Repository
  become: yes
  apt_repository: repo='deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' state=present

The license acceptance and java installation part was working fine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.