Comcast/ansible-sdkman

ansible fails when .bash_profile is not existing

lazydays79 opened this issue · 1 comments

I'm using zsh and therefore I don't have a .bash_profile. :)

TASK [comcast.sdkman : Detect settings in /home/michael/.bash_profile] ***********************
fatal: [raspi]: FAILED! => {"changed": false, "cmd": ["grep", "sdkman-init.sh", "/home/michael/.bash_profile"], "delta": "0:00:00.015137", "end": "2022-01-03 12:42:22.057589", "msg": "non-zero return code", "rc": 2, "start": "2022-01-03 12:42:22.042452", "stderr": "grep: /home/michael/.bash_profile: No such file or directory", "stderr_lines": ["grep: /home/michael/.bash_profile: No such file or directory"], "stdout": "", "stdout_lines": []}
...ignoring

It also fails when it exists but sdkman-init.sh couldn't be found (which is ok if you are'nt using bash at all).

TASK [comcast.sdkman : Detect settings in /home/michael/.bash_profile] ***********************
fatal: [raspi]: FAILED! => {"changed": false, "cmd": ["grep", "sdkman-init.sh", "/home/michael/.bash_profile"], "delta": "0:00:00.014666", "end": "2022-01-03 20:57:39.958810", "msg": "non-zero return code", "rc": 1, "start": "2022-01-03 20:57:39.944144", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring

Same for .profile.

TASK [comcast.sdkman : Detect settings in /home/michael/.profile] ****************************
fatal: [raspi]: FAILED! => {"changed": false, "cmd": ["grep", "sdkman-init.sh", "/home/michael/.profile"], "delta": "0:00:00.014836", "end": "2022-01-03 20:57:41.602084", "msg": "non-zero return code", "rc": 1, "start": "2022-01-03 20:57:41.587248", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring