Skip to content
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

rundeck does not output spaces/tabs properly #600

Closed
motilevy opened this issue Dec 2, 2013 · 5 comments
Closed

rundeck does not output spaces/tabs properly #600

motilevy opened this issue Dec 2, 2013 · 5 comments
Milestone

Comments

@motilevy
Copy link

motilevy commented Dec 2, 2013

Seems like rundeck does not behave like the shell when it comes to quotes text/spacing.

For example the following will have the same output:

echo " hi there "
echo ' hi there '

would both output : hi there without the leading white space.

@motilevy motilevy closed this as completed Dec 4, 2013
@gschueler
Copy link
Member

hi did you close this because it is not an issue? I have not had a chance to look into it

@motilevy
Copy link
Author

motilevy commented Dec 5, 2013

I closed it because the description was wrong.
The issue I am facing is that I need to quote everything when running commands in the "nodes" job field.

For example : if i'll do echo " hi;there " , you will see the job fails.
If you escape the ";" or single quote the whole string it works, ie:

echo "hi; there" will fail.
'echo "hi; there"' will work.
echo "hi; there" will work

I am assuming this a limitation of the underlying ssh client, and not sure if it can even be attributed to rundeck. One idea a colleague had was to write a wrapper that will "auto escape/quote" the commands before sending them to ssh but I cant see an option to do it.

@gschueler
Copy link
Member

what version are you using?

In rundeck 1.5.2 we updated the quoting/escaping. You can see how to properly escape things here: http://rundeck.org/docs/manual/job-workflows.html#quoting-arguments-to-steps

Note: we also are thinking of tweaking that behavior slightly, so that if your literal command is: echo " hi;there " then the quotes you wrote will be included. As it is now, if you need the quotes in the command, you will have to quote them again, e.g.: echo "' hi;there '"

@motilevy
Copy link
Author

motilevy commented Dec 5, 2013

I am using 1.6.2-1
And note the issue is not just with "jobs" this is actually something we can handle.
The main concern is when inputing a command into the "Enter a shell command" box under "nodes".

@gschueler
Copy link
Member

you should be able to double-quote things to have it work as you want.

I filed a new issue to improve the behavior here: #602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants