I would like to have the possibility to execute a rather lengthy shell skript on selected SSH Terminal connections on demand. Due to multiple reasons the usual anwser "just use ansible" is not usable here.
In general, I have this working using the "Terminal Command" type. I just have some special wishes that I just can't get to work
I've tried googling, reading documentation, experimented with a lot of different ideas, but I cannot work around (in the third case: implement) any of this points. I'm sure I've missed lot's of information, but I'm about to give up.
Does anyone have some hints what I might have missed?
Regards,
Jan
P.S.: My main target is RDM on Windows. Fun side-fact: A lot of the configuration options for this area of entry types seem to be (some more, some less) sublty different on MacOS, causing an interesting outlook if team-members using Apple devices need to use these entries.
Ok, I have a workaround that "works for me", even if it's not really what I would like to have.
I'm now encoding my script as BASE64 and do something like this:base64 -d > /tmp/somefilename <<'SCRIPTROLLOUTEOT'BASE64ENCODEDSCRIPTSCRIPTROLLOUTEOTchmod o+r /tmp/somefilename# Code that copies the decoded script-file to all required destinationsrm -f /tmp/somefilename
What I would have liked to do was basically the same, but