-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssh_shell is being ignored inside playbook #212
Comments
This regression was introduced some time back and set the default SSH shell to /bin/sh. This setting is considered the highest priority in CLI overrides and consequently enforced /bin/sh even if a custom SSH shell was set in the playbook.
This regression was introduced some time back and set the default SSH shell to /bin/sh. This setting is considered the highest priority in CLI overrides and consequently enforced /bin/sh even if a custom SSH shell was set in the playbook.
Thanks for the report. This unexpected regression has been fixed. The override for ssh_shell was incorrectly defaulted in the CLI parameters, causing Please note - the issue was real, but you may not solely rely on the log to understand which shell was used. In the example above, it may show "/bin/sh -c /tmp/.spot-719631138223510784/spot-script4222649707" because it wraps multiline commands with /bin/sh. However, the actual shell set in the script itself will automatically be the correct one (#!/bin/bash) in your case. You can also add something like Pls, check it out (on master) and let me know if the issue was fixed for you |
I have defined ssh_shell: /bin/bash inside playbook, but in verbose mode it show that us /bin/sh to launch:
Test in version: v1.16.0
spot -p test-env.yml -v --dry
spot v1.16.0-ca4ade3-2024-04-27T19:58:38Z
dry run - no changes will be made and no commands will be executed
[h1 192.168.1.42:22] run task "Some tests", commands: 1
[h1 192.168.1.42:22] run command "Testing enviroment vars"
[h1 192.168.1.42:22] > /bin/sh -c 'TESTVAR="example-value"; test -f /tmp/test_env.py'
[h1 192.168.1.42:22] ! command script /tmp/.spot-719631138223510784/spot-script4222649707
[h1 192.168.1.42:22] > #!/bin/sh
[h1 192.168.1.42:22] > set -e
[h1 192.168.1.42:22] > export TESTVAR="example-value"
[h1 192.168.1.42:22] > /tmp/test_env.py
[h1 192.168.1.42:22] > /bin/sh -c /tmp/.spot-719631138223510784/spot-script4222649707
[h1 192.168.1.42:22] completed command "Testing enviroment vars" {script: /bin/sh -c [multiline script]} (0s)
[h1 192.168.1.42:22] completed task "Some tests", commands: 1 (21ms)
If I call it in the command line works fine:
spot -p test-env.yml -v --dry --shell /bin/bash
spot v1.16.0-ca4ade3-2024-04-27T19:58:38Z
dry run - no changes will be made and no commands will be executed
[h1 192.168.1.42:22] run task "Some tests", commands: 1
[h1 192.168.1.42:22] run command "Testing enviroment vars"
[h1 192.168.1.42:22] > /bin/bash -c 'TESTVAR="example-value"; test -f /tmp/test_env.py'
[h1 192.168.1.42:22] ! command script /tmp/.spot-7313637980666303488/spot-script1822616870
[h1 192.168.1.42:22] > #!/bin/bash
[h1 192.168.1.42:22] > set -e
[h1 192.168.1.42:22] > export TESTVAR="example-value"
[h1 192.168.1.42:22] > /tmp/test_env.py
[h1 192.168.1.42:22] > /bin/bash -c /tmp/.spot-7313637980666303488/spot-script1822616870
[h1 192.168.1.42:22] completed command "Testing enviroment vars" {script: /bin/bash -c [multiline script]} (0s)
[h1 192.168.1.42:22] completed task "Some tests", commands: 1 (15ms)
The text was updated successfully, but these errors were encountered: