GithubHelp home page GithubHelp logo

idealista / java_role Goto Github PK

View Code? Open in Web Editor NEW
14.0 26.0 18.0 494 KB

Ansible role to install Java (OpenJDK, AdoptOpenJDK and Corretto)

Home Page: https://hub.docker.com/r/idealista/jdk

License: Apache License 2.0

Jinja 11.52% YAML 88.48%
java ansible debian openjdk jvm ubuntu docker-java java-virtual-machine java-ansible-role ansible-role

java_role's Introduction

Logo

Build Status Docker Hub pulls

Java Ansible role

This Ansible Role installs JDKs from different vendors (OpenJDK, AdoptOpenJDK and Corretto) in a Debian/Ubuntu or CentOS environment.

Getting Started

These instructions will get you a copy of the role for your Ansible playbook.

Once launched, it will install Java using Debian or RHEL packages.

Prerequisities

To use this role as dependency in your playbook, prerequisites below:

Ansible >=2.9.0 version installed. Inventory destination should be a Debian/Ubuntu or CentOS environment.

For testing purposes you will need Python 3.7+, Pipenv.

Installing

Create or add to your roles dependency file (e.g requirements.yml):

- src: http://github.com/idealista/java_role.git
  scm: git
  version: 7.0.0
  name: java

or using Ansible Galaxy as origin if you prefer:

- src: idealista.java_role
  version: 7.0.0
  name: java

Alternatively you could find tagged Docker images for Debian Stretch and Buster, Ubuntu Xenial, Bionic and Focal, and CentOS 7 and 8 in Docker Hub.

Install the role with ansible-galaxy command:

$ ansible-galaxy install -p roles -r requirements.yml -f

Use in a playbook:

---
- hosts: someserver
  roles:
    - java

Usage

Docker Hub

We publish every role version as a Docker image in Docker Hub: https://hub.docker.com/r/idealista/jdk.

You can pull our images by executing:

docker pull idealista/jdk:${JDK_VERSION}-${DOCKER_IMAGE_BASE}-${JDK_VENDOR}headless)

JDK_VERSION: Preferred JDK version. DOCKER_IMAGE: Currently supporting: stretch/buster/bullseye to select between Debian versions, xenial/bionic/focal to select between Ubuntu versions, and 7/8 to select a CentOS version. JDK_VENDOR: Currently supporting openjdk/ adoptopenjdk/corretto

For instance:

docker pull idealista/jdk:8u191-xenial-openjdk-headless

List of versions (tags) can be checked on Docker Hub

Ansible

defaults/main.yml

OpenJDK

A specific OpenJDK version should be selected overriding java_open_jdk_version_major variable using group vars/host vars:

Operative System OpenJDK major release
Debian Stretch 8 (default)
Debian Stretch 11
Debian Buster 11 (default)
Debian Bullseye 17
Debian Bullseye 11 (default)
Debian Bookworm 17
Debian Bookworm 17 (default)
Ubuntu Xenial 8
Ubuntu Xenial 9 (default)
Ubuntu Bionic 8
Ubuntu Bionic 11 (default)
Ubuntu Focal 8
Ubuntu Focal 11
Ubuntu Focal 17 (default)
Ubuntu Jammy 11
Ubuntu Jammy 17 (default)
CentOS 7 1.6.0
CentOS 7 1.7.0
CentOS 7 1.8.0
CentOS 7 11 (default)
CentOS 8 1.8.0
CentOS 8 11 (default)

Other OpenJDK implementations out of GNU/Linux distributions streams are not officially supported, but it's easy use this role too adding extra repositories (see vars/ in AdoptOpenJDK/Temurin and Corretto directories).

Adding certificates into Java's truststore

This role supports adding certificates into Java's truststore. Truststore location may change depending on Java version:

  • Truststore location for Java 9 onwards: $JAVA_HOME/lib/security/cacerts
  • Truststore location for Java prior to 9: $JAVA_HOME/jre/lib/security/cacerts

A specific truststore location should be selected overriding java_keystore_dir variable using group vars/host vars. In addition, you must to set which certificates you want to add setting java_certs variable and the truststore password setting java_cert_keystore_pass

Testing

$ pipenv sync
$ DOCKER_IMAGE_BASE=(debian:stretch-slim|debian:buster-slim|debian_bullseye-slim|amd64/ubuntu:xenial|amd64/ubuntu:bionic|amd64/ubuntu:focal|centos:7|centos:8) JDK_VENDOR=(`java_jdk_version` openjdk|adoptopenjdk|corretto) JDK_MAJOR=(`java_open_jdk_version_major` see [.travis.yml](.travis.yml) file to check supported versions) JDK_VERSION=(`java_open_jdk_version` see [.travis.yml](.travis.yml) file to check supported versions) pipenv run molecule test

Note: JDK_VENDOR is an optional parameter, if not defined this role will use openjdk. Note: JDK_VERSION is an optional parameter, if not defined this role will install the latest available package for the selected Java major release. Note: debian9 (Debian Stretch) will be used as default linux distro if none is provided.

See molecule directory to check possible testing platforms.

Built With

Ansible Molecule Packer

Versioning

For the versions available, see the tags on this repository.

Additionaly you can see what change in each version in the CHANGELOG.md file.

Authors

See also the list of contributors who participated in this project.

License

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

java_role's People

Contributors

antonioarenzanapulido avatar apolloclark avatar blalop avatar dortegau avatar emepege avatar eskabetxe avatar frantsao avatar jmonterrubio avatar mmolinac avatar sklirg avatar sorobon avatar vicsufer avatar

Stargazers

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

Watchers

 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

java_role's Issues

Ansible min version should be 2.3.x.x

Prerequisites

Description

Due to update_cache option in install dependencies for openJDK, idempotence check fails because every time this task is executed the apt cache is updated, and this task is marked with "changed": true.

Steps to Reproduce

  1. Execute this role using OpenJDK using ansible 2.2.x.x
  2. Execute a 'molecule check' task
  3. Check that 'install dependecies' is marked with "changed": true

Expected behavior: If no changes are performed, idempotence check should pass

Actual behavior: idempotence check doesn't pass

Reproduces how often: 100%

Versions

All versions

Additional Information

This behavior is described and detected as bug in Ansible:

tracerte/ssmtp-role#2
ansible/ansible-modules-core#5484

Remove jessie from supported version or add jessie-backports

Prerequisites

Description

openjdk-8-jre-headless package is not available in Debian Jessie repositories, it should be installed from backports

https://packages.debian.org/jessie-backports/openjdk-8-jre-headless

Steps to Reproduce

Run role against any Jessie

Versions

3.0.0

Additional Information

Drop OracleJDK support?

Prerequisites

Description

Should support for OracleJDK be dropped? I've been trying to debug the new updated OracleJDK urls, it requires registering a developer account, and using a limited time auth token in the URL to download. In theory I could add an Ansible step to login with my Oracle developer credentials, and grep the auth token from the HTTP response...

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Fix Debian repositories

Prerequisites

Description

Due to a change in Debian repositories, this role fails adding Jessie-backports repositories:

 TASK [java_role : Java | Add required repositories] ****************************
    task path: /Users/dortega/workspace/java_role/tasks/install_openjdk.yml:20
    Using module file /Users/dortega/.local/share/virtualenvs/java_role-P7W2Vlq3/lib/python3.6/site-packages/ansible/modules/packaging/os/apt_repository.py
    <openjdk> ESTABLISH DOCKER CONNECTION FOR USER: root
    <openjdk> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'openjdk', '/bin/sh', '-c', "/bin/sh -c 'echo ~ && sleep 0'"]
    <openjdk> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'openjdk', '/bin/sh', '-c', '/bin/sh -c \'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162 `" && echo ansible-tmp-1553760514.536889-153022047652162="` echo /root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162 `" ) && sleep 0\'']
    <openjdk> PUT /var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/tmpkc8tj2xe TO /root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162/apt_repository.py
    <openjdk> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'openjdk', '/bin/sh', '-c', "/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162/ /root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162/apt_repository.py && sleep 0'"]
    <openjdk> EXEC ['/usr/local/bin/docker', b'exec', b'-i', 'openjdk', '/bin/sh', '-c', '/bin/sh -c \'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162/apt_repository.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1553760514.536889-153022047652162/" > /dev/null 2>&1 && sleep 0\'']
    The full traceback is:
    Traceback (most recent call last):
      File "/tmp/ansible_sBpSq3/ansible_module_apt_repository.py", line 556, in <module>
        main()
      File "/tmp/ansible_sBpSq3/ansible_module_apt_repository.py", line 544, in main
        cache.update()
      File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 443, in update
        raise FetchFailedException(e)
    apt.cache.FetchFailedException: W:Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found
    , E:Some index files failed to download. They have been ignored, or old ones used instead.
    
    failed: [openjdk] (item=deb http://ftp.debian.org/debian jessie-backports main) => {
        "changed": false,
        "failed": true,
        "item": "deb http://ftp.debian.org/debian jessie-backports main",
        "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_sBpSq3/ansible_module_apt_repository.py\", line 556, in <module>\n    main()\n  File \"/tmp/ansible_sBpSq3/ansible_module_apt_repository.py\", line 544, in main\n    cache.update()\n  File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 443, in update\n    raise FetchFailedException(e)\napt.cache.FetchFailedException: W:Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found\n, E:Some index files failed to download. They have been ignored, or old ones used instead.\n",
        "module_stdout": "",
        "msg": "MODULE FAILURE",
        "rc": 0
    }

Steps to Reproduce

Every installation under Debian environment

Reproduces how often: 100%

Versions

All

Additional Information

https://lists.debian.org/debian-devel-announce/2019/03/msg00006.html

Release new jdk 8 version to docker

Prerequisites

Description

[Description of the issue]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]

Reproduces how often: [What percentage of the time does it reproduce?]

Versions

The version/s you notice the behavior.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Update installation for Debian 10 (buster)

Prerequisites

Description

Installation fails in debian 10 systems.

Versions

All

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

OracleJDK 8 URL is not working

Prerequisites

Description

When trying to use the role with OracleJDK, it gets the following error:

fatal: [oraclejdk]: FAILED! => {"changed": false, "dest": "/tmp/jdk-1.8.0_151.tar.gz", "failed": true, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz"}

Steps to Reproduce

  1. Set java_implementation: oraclejdk
  2. Set java_oracle_jdk_version: 1.8.0_151 or java_oracle_jdk_version: 1.8.0_152
  3. Run the role

Expected behavior:

Install OracleJDK

Actual behavior:

Download task fails, getting 404 code.

Reproduces how often:

Always

Add task to ensure /usr/share/man/man1 is present

Prerequisites

Description

When trying to install the role in some -slim Docker images, the path /usr/share/man/man1 is not present and is required if installing OpenJDK. A fix was add in that Molecule scenario, but should be add in the role.

Steps to Reproduce

  1. Get a debian:stretch-slim Docker image
  2. Try to install the role on it

Expected behavior: Java is installed and everything works flawlessly

Actual behavior: Flawlessly fails.

Reproduces how often: 100%

Versions

All? At least, 4.1.0

add java .so libraries to LD_LIBRARY_PATH

Description

Add to LD_LIBRARY_PATH java libraries in jdk
this: $JAVA_HOME/jre/lib/amd64/server
and maybe this $JAVA_HOME/jre/lib/amd64

Woulfd be fine to add this to
/etc/profile.d/jdk.sh

Better way for Docker image creation

Prerequisites

Description

Now we're using Geerlingguy's Docker images as base image for our Java role's image in Dockerhub. Though they're perfectly fine, the way the images are built is not the best and leaves the container with Ansible and the Java Role installed, when is not necessary at all. So we'll look for creating images without Ansible on them and based on Debian Slim images.

Solve Ansible Galaxy Warnings

Prerequisites

Description

Solve Ansible Galaxy warnings:

Warnings: 3
2 E405:  Remote package tasks should have a retry
1 E204:  Lines should be no longer than 120 chars

Unable to download Oracle Java 1.8.0_191

Prerequisites

Description

The role is unable to download default Oracle Java version from their site.

Steps to Reproduce

  1. Use the role with the following syntax:
- include_role:
    name: idealista.java_role
  vars:
    java_implementation: 'oraclejdk'

You can also use it with the latest version available inside the role:

- include_role:
    name: idealista.java_role
  vars:
    java_implementation: 'oraclejdk'
    java_oracle_jdk_version: '1.8.0_192'
  1. I've run my playbook.

Expected behavior: [What you expect to happen]
Oracle Java downloaded and installed with default values.

Actual behavior: [What actually happens]

I get the following error:

TASK [idealista.java_role : Java | Download .tar.gz file containing binaries from Oracle website] **************************************
Wednesday 16 January 2019  15:39:48 +0100 (0:00:00.863)       0:03:33.792 ***** 
[DEPRECATION WARNING]: Supplying `headers` as a string is deprecated. Please use dict/hash format for `headers`. This feature will be 
removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [myhost02]: FAILED! => {"changed": false, "dest": "/tmp/jdk-1.8.0_191.tar.gz", "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz"}

And it's the same with version 1.8.0_192.

Reproduces how often: [What percentage of the time does it reproduce?]
All the times.

Versions

Current master branch version.

Additional Information

ansible 2.7.5
  config file = None
  configured module search path = ['/Users/mmolinac/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.7.5/libexec/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.2 (default, Jan 13 2019, 12:50:01) [Clang 10.0.0 (clang-1000.11.45.5)]

ORACLE JAVA 7 - 404 not found

No funciona instalando la oracle Java7. Realizaré unas modificaciones y os pasaré la PR.
Muchas gracias

Traza:


      "Downloading Oracle Java 7...",
        "--2017-09-01 09:34:09--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz",
        "Resolving download.oracle.com (download.oracle.com)... 92.123.73.186, 92.123.73.83",
        "Connecting to download.oracle.com (download.oracle.com)|92.123.73.186|:80... connected.",
        "HTTP request sent, awaiting response... 302 Moved Temporarily",
        "Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]",
        "--2017-09-01 09:34:09--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz",
        "Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.37.165.204, 2a02:26f0:b1:282::2d3e, 2a02:26f0:b1:283::2d3e",
        "Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.37.165.204|:443... connected.",
        "HTTP request sent, awaiting response... 302 Moved Temporarily",
        "Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1504258569_4447ea6ade9e3d2cae83b1ba585e35ae [following]",
        "--2017-09-01 09:34:09--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1504258569_4447ea6ade9e3d2cae83b1ba585e35ae",
        "Connecting to download.oracle.com (download.oracle.com)|92.123.73.186|:80... connected.",
        "HTTP request sent, awaiting response... 404 Not Found",
        "2017-09-01 09:34:10 ERROR 404: Not Found."

Avoiding duplicated files using molecule.interpolation.Interpolator class

Prerequisites

Description

There are some files that are very similar (molecule.yml files in each scenario). Probably these files could be merged in one using molecule.interpolation.Interpolator class, and adding these values as environment variables.

Undefined variable java_open_jdk_version

Prerequisites

Description

Problems with the new version 3.4.0. java_open_jdk_version is required.

Steps to Reproduce

  1. Upgrade to 3.4.0
  2. Run playbook

Expected behavior: Role would be works with defaults variable as previous version.

Actual behavior: undefined variable error is thrown.

Reproduces how often: Always

Versions

3.4.0

Additional Information

Remove deprecated oraclejdk

Prerequisites

Description

[Description of the issue]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]

Reproduces how often: [What percentage of the time does it reproduce?]

Versions

The version/s you notice the behavior.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Oracle Java 8 update version outdated

Prerequisites

Description

The java 8 version from oracle return a 404:
fatal: [oraclejdk]: FAILED! => {"changed": false, "dest": "/tmp/jdk-1.8.0_161.tar.gz", "failed": true, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz"}

Steps to Reproduce

  1. java_implementation: oraclejdk

Expected behavior: Installs java 8

Actual behavior: Error

Reproduces how often: Always

Versions

2.0.1

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Cant install java 11 if java 8 was previous intalled

Prerequisites

Description

On debian stretch, cannot update to java 11 if java 8 was installed previous

Steps to Reproduce

  1. install java 8
  2. update to java 11

Expected behavior: Java 11 should be installed

Actual behavior: Java 8 isnt update to java 11

Reproduces how often: 100%

Versions

5.2.0

Improve documentation showing how to compile Java classes using image hosted in Docker Hub

Prerequisites

Description

It would be nice to add documentation showing how to compile Java classes using docker image hosted in Docker Hub.

Additional Information

https://hub.docker.com/_/golang/?tab=description Has good examples showing how to compile a project in Go

Add java version to docker image tag name

Prerequisites

Description

IMHO the tag name should include installed java version number instead of role version name:

$ docker run -it idealista/jdk:3.3.0-debian9-openjdk /usr/bin/java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

Probably 3.3.0 is meaningless for the majority of java users and 1.8.0_181 should be used.

Note: The problem is to extract this version name, because in openjdk isn't explicitly specified. Related issue: #57

Problems with oracle jdk

Prerequisites

Description

role fails with java_implementation: "oraclejdk"

Steps to Reproduce

  1. set java_implementation: "oraclejdk"
  2. Run

Expected behavior: Role run ok

Actual behavior: Role fails

Reproduces how often: Always

Versions

3.0.3

Additional Information

Cannot run this role under Debian Jessie because jessie-backports is not configured

Prerequisites

Description

Cannot run this role under Debian Jessie because jessie-backports is not configured. These instructions should be followed in order to enable jessie-backports in jessie:

https://backports.debian.org/Instructions/

Steps to Reproduce

  1. Execute 'docker build . -t test -f Dockerfile' under dockerhub/Debian8 directory
  2. Profit!

Expected behavior: Openjdk 8 installed
Actual behavior: An error ocurred
Reproduces how often: 100%

OpenJDK should be installed by default using headless mode

Prerequisites

Description

IMHO OpenJDK should be installed using headless package, because 99.9% of time users doesn't need graphical interface (executing non GUI Java programs).

Probably this speed up OpenJDK installation.

Versions

all

Additional Information

Update JRE versions, remove Debian Jessie support

Prerequisites

Description

Some JRE versions are outdated, causing travis test failing. They must be updated.
Debian Jessie is out of support, configurations must be removed.

Versions

5.2.0

Sometimes fails building an Ansible compatible image when latest Docker versioned image is used as dependency

Prerequisites

Description

Sometimes fails building an Ansible compatible image when latest Docker versioned image is used as dependency. I need this Image to speed up solrcloud role execution 😢.

IMHO we should build images for every Java version this role could create . It would be nice if the word "Ansible" is removed from the image name.

Steps to Reproduce

  1. Add idealista/java-debian-ansible as dependency in solrcloud-role
  2. Execute 'pipenv run molecule test'

Expected behavior: Normal test execution

Actual behavior: Fails when is "building an Ansible compatible Image":

TASK [Build an Ansible compatible image] ***************************************
    failed: [localhost] (item={'_ansible_parsed': True, u'src': u'/Users/dortega/.ansible/tmp/ansible-tmp-1543327408.45-231462761729504/source', '_ansible_item_result': True, u'group': u'staff', u'uid': 502, u'size': 793, 'item': {'image_version': u'3.0.1-debian8', 'name': u'zookeeper', 'image': u'idealista/java-debian-ansible', 'capabilities': [u'SYS_ADMIN'], 'privileged': True, 'command': u'/lib/systemd/systemd', 'groups': [u'zookeeper_group'], 'volumes': [u'/sys/fs/cgroup:/sys/fs/cgroup:ro'], 'networks': [{'name': u'solr-network', 'aliases': [u'zookeeper']}]}, u'dest': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible', u'checksum': u'cd4b2e390a16761272a517f568c372fc5ad5a846', u'changed': True, 'failed': False, u'state': u'file', u'gid': 20, u'mode': u'0644', u'invocation': {u'module_args': {u'directory_mode': None, u'force': True, u'remote_src': None, u'owner': None, u'follow': False, u'local_follow': None, u'group': None, u'unsafe_writes': None, u'setype': None, u'content': None, u'serole': None, u'dest': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible', u'selevel': None, u'original_basename': u'Dockerfile.j2', u'regexp': None, u'validate': None, u'src': u'/Users/dortega/.ansible/tmp/ansible-tmp-1543327408.45-231462761729504/source', u'checksum': u'cd4b2e390a16761272a517f568c372fc5ad5a846', u'seuser': None, u'delimiter': None, u'mode': None, u'attributes': None, u'backup': False}}, u'owner': u'dortega', 'diff': [], u'md5sum': u'ef3d61319249b3651eb2b932d891bf30', '_ansible_ignore_errors': None, '_ansible_no_log': False}) => {"changed": false, "item": {"changed": true, "checksum": "cd4b2e390a16761272a517f568c372fc5ad5a846", "dest": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible", "diff": [], "failed": false, "gid": 20, "group": "staff", "invocation": {"module_args": {"attributes": null, "backup": false, "checksum": "cd4b2e390a16761272a517f568c372fc5ad5a846", "content": null, "delimiter": null, "dest": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "original_basename": "Dockerfile.j2", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/Users/dortega/.ansible/tmp/ansible-tmp-1543327408.45-231462761729504/source", "unsafe_writes": null, "validate": null}}, "item": {"capabilities": ["SYS_ADMIN"], "command": "/lib/systemd/systemd", "groups": ["zookeeper_group"], "image": "idealista/java-debian-ansible", "image_version": "3.0.1-debian8", "name": "zookeeper", "networks": [{"aliases": ["zookeeper"], "name": "solr-network"}], "privileged": true, "volumes": ["/sys/fs/cgroup:/sys/fs/cgroup:ro"]}, "md5sum": "ef3d61319249b3651eb2b932d891bf30", "mode": "0644", "owner": "dortega", "size": 793, "src": "/Users/dortega/.ansible/tmp/ansible-tmp-1543327408.45-231462761729504/source", "state": "file", "uid": 502}, "msg": "Error building molecule_local/idealista/java-debian-ansible - code: 100, message: The command '/bin/sh -c if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean;     elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all;     elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all;     elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a;     elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi' returned a non-zero code: 100, logs: [u'Step 1/2 : FROM idealista/java-debian-ansible', u'\\n', u' ---> 41764fa940e2\\n', u\"Step 2/2 : RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean;     elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all;     elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all;     elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a;     elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi\", u'\\n', u' ---> Running in ae15a5e6564e\\n', u'Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease\\nIgn:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease\\n', u'Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]\\n', u'Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]\\n', u'Hit:5 http://cdn-fastly.deb.debian.org/debian stretch Release\\n', u'Hit:6 http://cdn-fastly.deb.debian.org/debian stretch Release\\n', u'Err:6 http://cdn-fastly.deb.debian.org/debian stretch Release\\n  Failed to stat - stat (2: No such file or directory)\\n', u'Get:7 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [460 kB]\\n', u'Reading package lists...', u'\\n', u\"\\x1b[91mE: The repository 'http://http.debian.net/debian stretch Release' does no longer have a Release file.\\n\\x1b[0m\", u'Removing intermediate container ae15a5e6564e\\n']"}
    failed: [localhost] (item={'_ansible_parsed': True, u'changed': False, u'group': u'staff', u'uid': 502, 'item': {'image_version': u'3.0.1-debian8', 'name': u'solrcloud', 'image': u'idealista/java-debian-ansible', 'capabilities': [u'SYS_ADMIN'], 'privileged': True, 'command': u'/lib/systemd/systemd', 'groups': [u'solrcloud_group'], 'volumes': [u'/sys/fs/cgroup:/sys/fs/cgroup:ro'], 'networks': [{'name': u'solr-network', 'links': [u'zookeeper:zookeeper'], 'aliases': [u'solrcloud']}]}, 'dest': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible', 'checksum': u'cd4b2e390a16761272a517f568c372fc5ad5a846', '_ansible_item_result': True, 'failed': False, u'state': u'file', u'gid': 20, u'mode': u'0644', u'invocation': {u'module_args': {u'directory_mode': None, u'force': False, u'remote_src': None, u'path': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible', u'owner': None, u'follow': False, u'group': None, u'unsafe_writes': None, u'serole': None, u'content': None, u'state': u'file', u'diff_peek': None, u'setype': None, u'dest': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible', u'selevel': None, u'original_basename': u'Dockerfile.j2', u'regexp': None, u'validate': None, u'src': u'Dockerfile.j2', u'seuser': None, u'recurse': False, u'delimiter': None, u'mode': None, u'attributes': None, u'backup': None}}, u'owner': u'dortega', u'path': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible', u'size': 793, 'diff': {u'after': {u'path': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible'}, u'before': {u'path': u'/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible'}}, '_ansible_ignore_errors': None, '_ansible_no_log': False}) => {"changed": false, "item": {"changed": false, "checksum": "cd4b2e390a16761272a517f568c372fc5ad5a846", "dest": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible", "diff": {"after": {"path": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible"}, "before": {"path": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible"}}, "failed": false, "gid": 20, "group": "staff", "invocation": {"module_args": {"attributes": null, "backup": null, "content": null, "delimiter": null, "dest": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible", "diff_peek": null, "directory_mode": null, "follow": false, "force": false, "group": null, "mode": null, "original_basename": "Dockerfile.j2", "owner": null, "path": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible", "recurse": false, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "Dockerfile.j2", "state": "file", "unsafe_writes": null, "validate": null}}, "item": {"capabilities": ["SYS_ADMIN"], "command": "/lib/systemd/systemd", "groups": ["solrcloud_group"], "image": "idealista/java-debian-ansible", "image_version": "3.0.1-debian8", "name": "solrcloud", "networks": [{"aliases": ["solrcloud"], "links": ["zookeeper:zookeeper"], "name": "solr-network"}], "privileged": true, "volumes": ["/sys/fs/cgroup:/sys/fs/cgroup:ro"]}, "mode": "0644", "owner": "dortega", "path": "/var/folders/5n/g2ggh_bj56bc2pw09yfhqh480000gp/T/molecule/solrcloud-role/default/Dockerfile_idealista_java_debian_ansible", "size": 793, "state": "file", "uid": 502}, "msg": "Error building molecule_local/idealista/java-debian-ansible - code: 100, message: The command '/bin/sh -c if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean;     elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all;     elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all;     elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a;     elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi' returned a non-zero code: 100, logs: [u'Step 1/2 : FROM idealista/java-debian-ansible', u'\\n', u' ---> 41764fa940e2\\n', u\"Step 2/2 : RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean;     elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all;     elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all;     elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a;     elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi\", u'\\n', u' ---> Running in 622b8184d5cc\\n', u'Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]\\n', u'Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease\\nIgn:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease\\n', u'Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]\\n', u'Hit:5 http://cdn-fastly.deb.debian.org/debian stretch Release\\n', u'Hit:6 http://cdn-fastly.deb.debian.org/debian stretch Release\\n', u'Err:6 http://cdn-fastly.deb.debian.org/debian stretch Release\\n  Failed to stat - stat (2: No such file or directory)\\n', u'Get:7 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [460 kB]\\n', u'Reading package lists...', u'\\n', u\"\\x1b[91mE: The repository 'http://deb.debian.org/debian stretch Release' does no longer have a Release file.\\n\\x1b[0m\", u'Removing intermediate container 622b8184d5cc\\n']"}

Reproduces how often: most times

Versions

versions >= 3.0.1

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Remove ansible deprecation warnings

Prerequisites

Description

Deprecation warnings are displayed when running the role:

[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is
discouraged. The module documentation details page may explain more about this
rationale.. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

Steps to Reproduce

  1. Add the role to a playbook
  2. Run the playbook

Actual behavior: Deprecation warnings

Reproduces how often: Always

Versions

2.0.2

Should Ubuntu source repositories be replaced by faster ones?

Prerequisites

Description

At least in Ubuntu Bionic, APT has to download 125MB of packages installing openJDK. Sometime fails in Travis because the 10 minutes timeout. Should this source repositories be replaced by faster ones?

Steps to Reproduce

  1. Execute Travis Build
  2. See what happens with openJDK builds in Ubuntu Xenial/Bionic

Expected behavior: Pass travis build (at least install openJDK packages)

Actual behavior: Sometimes fails because 10 minutes timeout

Reproduces how often: ~75%

Versions

Since Ubuntu is supported in this role

Upgrade role and fix dependencies

Prerequisites

Description

It would be nice if this role:

  • Use Ansible >= 2.4.5.0 and Molecule >= 2.0
  • Use Pipenv to make a reproducible testing environment under Travis (and to be used for other developers without spending time solving some weird dependency problems 😄)
  • Use Goss instead of Testinfra

Latest package version by default

Prerequisites

Description

When there is a new java package in the same minor release of a OS distribution, the role tests crash because they can't download the old fixed version. It forces us to create new PR's to upgrade the default java version, and all the playbooks that use this role.

Steps to Reproduce

  1. Run the role after a new Debian release.

Expected behavior:

The java package is installed.

Actual behavior:
The role crashes because it can't find an older java package than the new release.

Reproduces how often:

Always.

Versions

All.

Unable to download Oracle Java 1.8.0_202

Prerequisites

Description

The role is unable to download current Oracle Java versions from their site.

Steps to Reproduce

  1. Use the role with the following syntax:
- include_role:
    name: idealista.java_role
  vars:
    java_implementation: 'oraclejdk'

You can also use it with the latest version available inside the role:

- include_role:
    name: idealista.java_role
  vars:
    java_implementation: 'oraclejdk'
    java_oracle_jdk_version: '1.8.0_202'
  1. I've run my playbook.

Expected behavior: [What you expect to happen]
Oracle Java downloaded and installed with default values.

Actual behavior: [What actually happens]
I get the following error:

TASK [idealista.java_role : Java | Download .tar.gz file containing binaries from Oracle website] ***
FAILED - RETRYING: Java | Download .tar.gz file containing binaries from Oracle website (3 retries left).
FAILED - RETRYING: Java | Download .tar.gz file containing binaries from Oracle website (2 retries left).
FAILED - RETRYING: Java | Download .tar.gz file containing binaries from Oracle website (1 retries left).
[DEPRECATION WARNING]: Supplying `headers` as a string is deprecated. Please 
use dict/hash format for `headers`. This feature will be removed in version 
2.10. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
fatal: [tools02-dev]: FAILED! => {"attempts": 3, "changed": false, "dest": "/tmp/jdk-1.8.0_202.tar.gz", "msg": "Connection failure: ('The read operation timed out',)", "state": "absent", "url": "https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.tar.gz"}

Reproduces how often: [What percentage of the time does it reproduce?]

Always

Versions

Current master branch version.

Additional Information

ansible 2.7.10
  config file = None
  configured module search path = ['/Users/mmolinac/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.7.10/libexec/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]

Create images for buster adoptopenjdk

Prerequisites

Description

Upload to dockerhub images for debian-buster with adoptopenjdk

Steps to Reproduce

N/A

Expected behavior: With each new release, a docker image debian-buster with adoptopenjdk is pushed.

Actual behavior: Not implemented yet

Reproduces how often: N/A

Versions

N/A

Additional Information

N/A

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.