Skip to content

Error on Windows Server 2016 #124

@lispercat

Description

@lispercat
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions