if I put a command like
ssh root@XXX.XXX.XXX.XXX 'ls'
Which will ssh to the server and run the command "ls" on it directly into the pipelines.yml file it works fine.
But if I save the exact same string in a deployment variable e.g. CMD and then use the $CMD value in the .yml file it fails. It seems as though the quoted portion is attempted to run on the build machine rather than running ssh and sending the string to the remote server.
I'd like to use variables mainly so that developers that have write access to the repo do not have SSH access to run any commands but it would also be nice to be able to vary the between environments.
Any ideas?