Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Install Oracle JRE8 on a Windows 10 machine fails as choco_ vars not set for this by default

Open
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
ansible, java
Domain
devops

Research direction

Start with vars/java_distro_configs/oracle_java_vars.yml and compare it with tasks/Win32NT/install/chocolatey.yml, especially the choco_java_package reference. Reproduce the Oracle JRE8 Chocolatey deployment on Windows 10 and verify that the role no longer reports an undefined choco_ variable and completes installation.

Written by the indexing model from the issue text.

Description

SUMMARY

Trying to install Oracle JRE8 on a Windows 10 machine using transport chocolatey.
Fails as oracle_java_vars.yml does not define the choco_ variables.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vars\java_distro_configs\oracle_java_vars.yml

ANSIBLE VERSION

ansible 2.9.15
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0]

CONFIGURATION

From playbook under pre_task:

  • name: Installing role
    include_role:
    name: lean_delivery.java
    vars:
    java_distribution: oracle_java
    java_package: jre
    transport: chocolatey
    java_major_version: 8
OS / ENVIRONMENT

Ansible controller: Ubuntu
Host: Windows 10 PRO

STEPS TO REPRODUCE

Just try deploy to Windows 10 host with the configuration I outlined. Will 100% fail

EXPECTED RESULTS

Playbook fails.

ACTUAL RESULTS

Dump of error:
TASK [lean_delivery.java : Install {{ choco_java_package }} from chocolatey] ***********************************************************************************************************************************************task path: /root/.ansible/roles/lean_delivery.java/tasks/Win32NT/install/chocolatey.yml:7
fatal: [dk-winv-jenag01.3shape.local]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'choco_java_package' is undefined\n\nThe error appears to be in '/root/.ansible/roles/lean_delivery.java/tasks/Win32NT/install/chocolatey.yml': line 7, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: 'Install {{ choco_java_package }} from chocolatey'\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - "{{ foo }}"\n"
}

Dominant language
Jinja
Stars
60
Forks
30
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lean-delivery/ansible-role-java

All issues in lean-delivery/ansible-role-java

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.