ansible-role-java icon indicating copy to clipboard operation
ansible-role-java copied to clipboard

Error on Windows Server 2016

Open lispercat opened this issue 4 years ago • 0 comments

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.

lispercat avatar Jul 14 '21 21:07 lispercat