In either cloud-init user-data runcmd, or in autoinstall late-commands, I need to essentially run this command as part of a Clevis + Tang initialization for a LUKS encrypted volume:
echo '<secret>' | clevis luks bind -d /dev/sda2 tang '{"url": "http://<ip-tangserver>" , "adv": "/tmp/adv.jws" }'
The problem is, I'm having a hard time determining if this is actually possible using either runcmd or late-commands, and if so, how I can do this in a YAML-compliant way, eg:
runcmd:
- echo 'some-luks-temp-passwd' | clevis luks bind -d /dev/vda3 tang '{"url": "http://192.168.122.150" , "adv": "/tmp/adv.jws" }'
Enclosing the entire string above doesn't seem to work either, yamllint still shows a syntax error:
runcmd:
- "echo 'some-luks-temp-passwd' | clevis luks bind -d /dev/vda3 tang '{"url": "http://192.168.122.150" , "adv": "/tmp/adv.jws" }'"
Thanks!