Closed shoneslab closed 4 years ago
I think this is due to export
being a builtin bash command. We need to fix this by adding support for passing environment variables into the commands and sourcing files. Since Trackman spins off new processes as a child process, a workaround is to run trackman with all the environment variables you'd need to pass into the child processes:
export FOO=bar trackman ...
Thanks.
Also pipe (|) not working in trackman config file
command: ansible --version | head -n 1 | gawk '{ print $2 }'
That's a good question and I don't have the answer! Will have to try. Given the way Trackman calls the executables, it doesn't have access to bash syntax, including pipes. One solution (which would cover the first issue on ENV as well) is to run bash
as the command with the rest following as params. Example:
...
...
command: "bash '-c ansible --version | head n -1'"
Trying to set an environment variable in the workflow.yml It works when I set the environment variable directly in the console/terminal
Getting errors
ERRO[0000] Failed to run Step="set ansible config" ERRO[0000] exec: "export": executable file not found in $PATH Step="set ansible config" ERRO[0000] Calling a stop to run Step="set ansible config" ERRO[0000] Done with errors