Hi Jean, working on the same problem.
I've scanned through the API docs, and the linode-cli source code. Using the API docs, I suspect this might take the form of:
* linode.create to set up the new linode (
https://www.linode.com/api/linode/linode.create )
* linode.disk.createfromstackscript which sets up a new disk using parameter stackscript (
https://www.linode.com/api/linode/linod ... tackscript )
Specifically:
theckman wrote:
You would then do linode.disk.createfromstackscript() as well as linode.disk.create() to create your swap image. Then you'd want to create your configuration profile using linode.config.create().
(source:
viewtopic.php?t=9816&p=56206 )
However, based on grepping the source, it seems linode-cli does not support the disk management APIs yet. Therefore, this might only be possible via mixing the CLI with direct API calls as per above; specifically, eg wget
https://api.linode.com/?api_key=abc123& ... ackscript&[parameters...] at the bottom of your linode creation scripts.