Comcast / ansible-sdkman

An Ansible role that installs, configures, and manages SDKMAN
https://galaxy.ansible.com/Comcast/sdkman/
Apache License 2.0
58 stars 28 forks source link

Undefined SDKMAN_DIR variable #37

Closed wavyx closed 5 years ago

wavyx commented 5 years ago

The task TASK [comcast.sdkman : Determine SDKMAN user HOME directory] is skipped if you already defined the group variable sdkman_dir. This leads to a failure in the next TASK [comcast.sdkman : Set SDKMAN_DIR environment variable] which is relying on stdout result. https://github.com/Comcast/ansible-sdkman/blob/master/tasks/install.yml#L9

TASK [comcast.sdkman : Determine SDKMAN user HOME directory] ***** task path: /root/infrastructure/ansible/roles/comcast.sdkman/tasks/install.yml:9 skipping: [hostname] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [comcast.sdkman : Set SDKMAN_DIR environment variable] ** fatal: [es01.data.be]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/root/infrastructure/ansible/roles/comcast.sdkman/tasks/install.yml': line 20, 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 SDKMAN_DIR environment variable\n ^ here\n"}

Environment Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64) Ansible 2.7.6 group_vars: sdkman_dir: /usr/local/sdkman

elliotweiser commented 5 years ago

Fixed in #40