@olivierlambert / @Sam According to the Gitlab docs the project URI needs to be in URL encoded format, resulting in a working line as below in my own cloud-init:
deb [trusted=yes] https://gitlab.com/api/v4/projects/xen-project\%252Fxen-guest-agent/packages/generic/deb-amd64/ release/
I found this through experimentation, but weirdly it seems to be a double-URL encoded string at that point in the URI for Gitlab… go figure.
I have another escape related question though. I'm not sure if it's your YAML parser or my editor but if I attempt to use the % as found in the beginning of the documentation example, neovim no longer recognises the file as YAML. So this:
#cloud-config
hostname: {name}
fqdn: {name}%.my-domain.com
from line 3 onwards doesn't work correctly, despite being valid YAML 1.2.2.
Again to get this working, I had to surround the value with single quotes:
#cloud-config
hostname: '{name}%'
fqdn: '{name}%.my-domain.com'
Which library / version of YAML are you targeting?
Also, is the UUID or mac address of a VM exposed to the cloud-init parser internally (or is there a list somewhere of other variables like {name}
that are?).
Thanks for a great product and I hope this helps someone