Can options be set in a model assertion file?

Imagine you wish to create a custom image for your release. At the moment one would build a custom like this.

Say some of the snaps require options to be set, e.g. say one makes a kiosk with wpe-webkit-mir-kiosk, and you wish all your terminals to have:

sudo snap set wpe-webkit-mir-kiosk url=https://snapcraft.io

Is the recommended way to SSH in every device one sets up, then issue this command? Is there there no way to bake it into the model assertion so when one deploys the image it is automatically set. Is there some other recommended way?

You can set defaults for specific snaps via the gadget, see https://snapcraft.io/docs/gadget-snap#heading--gadget specifically the defaults key in the gadget.yaml is what you want.

1 Like

Fantastical! Thank you! :+1: