Error on Windows Server 2016
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with tasks/Win32NT/finalize_paths.yml at line 12 and reproduce the reported playbook on Windows Server 2016 using Ansible 2.10.8. Trace why the Java path lookup has an empty sequence when using the jdk package, Chocolatey transport, and Java 11. Done means the role installs the Java SDK without the undefined-variable error or requiring manual directory creation.
Written by the indexing model from the issue text.
Description
SUMMARY
Got an error:
TASK [lean_delivery.java : Set actual java directory] ****************************************************************************************************************************************************************************************************************************************
fatal: [win-iiq]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No last item, sequence was empty.\n\nThe error appears to be in '/etc/ansible/roles/lean_delivery.java/tasks/Win32NT/finalize_paths.yml': line 12, 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: Set actual java directory\n ^ here\n"}
ISSUE TYPE
- Bug Report
ANSIBLE VERSION
ansible 2.10.8
config file = None
configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.9.6 (default, Jun 29 2021, 10:19:25) [GCC 10.3.0]
CONFIGURATION
OS / ENVIRONMENT
Windows Server 2016 obtained via vagrant box "jborean93/WindowsServer2016"
STEPS TO REPRODUCE
---
- name: Install openjdk java
hosts: win-dev
roles:
- role: lean_delivery.java
java_package: jdk
transport: chocolatey
java_major_version: 11
java_minor_version: 0.2
EXPECTED RESULTS
Java SDK installed on the system
ACTUAL RESULTS
TASK [lean_delivery.java : Set actual java directory] ****************************************************************************************************************************************************************************************************************************************
fatal: [win-iiq]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No last item, sequence was empty.\n\nThe error appears to be in '/etc/ansible/roles/lean_delivery.java/tasks/Win32NT/finalize_paths.yml': line 12, 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: Set actual java directory\n ^ here\n"}
Folder c:\Program Files\Java doesn't get created
If I create it manually, same error happens.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lean-delivery/ansible-role-java
-
macOS Sonoma supportOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
lean-delivery/ansible-role-java#136 · 1 comment ·
-
Fix Azure testsOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Fix Centos8 testsOpen
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
All issues in lean-delivery/ansible-role-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
taskcluster/taskcluster#9284 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ROCm/rocm-systems#13754 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
splunk/terraform-provider-splunk#256 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 3 days