Skip to content

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

@RengokuDK

Description

@RengokuDK
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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions