How can I use a pipe to redirect the output of a command in my runcmd
section of my cloud init script? The following fails:
runcmd:
- [curl, -sk, https://example.com/packages/current/install.bash, '|', /bin/bash, -s, agent:certname=XYZ.com]
It ends up creating a script that looks like this:
'curl' '-sk' 'https://example.com/packages/current/install.bash' '|' '/bin/bash' '-s' 'agent:certname=XYZ.com'
Because the pipe becomes quoted, the script fails. How can I get around this problem?
[sh, -c, 'curl -sk https://example.com/packages/current/install.bash | /bin/bash -s agent:certname=XYZ.com']
? – Multitudinous