The apt flag that you're requesting (--allow-releaseinfo-change) says
that it is applied via config in apt_preferences(5) configuration
item: Acquire::AllowReleaseInfoChange.
Cloud-init does not have configuration syntax to modify apt_preferences(5).
Unfortunately it does not look like you can configure this in apt.conf.d.
a.) support in maas for generic user-supplied cloud-config to enlistment
environment where you could just use write_files.
b.) specific support in maas for 'apt-preferences' configuration to the
enlistment environment and also changes to cloud-init to expose
'apt-preferences' configuration.
Both of these require some change in MAAS (or just answering "here is how you do 'a'" above.
The first question/easiest answer is:
Why is your mirror misbehaving / Fix your mirror.
You can pass apt options to cloud-init via apt_configure module /cloudinit. readthedocs. io/en/latest/ topics/ modules. html#apt- configure
https:/
The apt flag that you're requesting (--allow- releaseinfo- change) says :AllowReleaseIn foChange.
that it is applied via config in apt_preferences(5) configuration
item: Acquire:
Cloud-init does not have configuration syntax to modify apt_preferences(5).
Unfortunately it does not look like you can configure this in apt.conf.d.
write_files could be used to write a file into /etc/apt/ preferences. d/ /cloudinit. readthedocs. io/en/latest/ topics/ modules. html#write- files
with the desired configuration.
https:/
So, if you can convince MAAS to send cloud-config with something like the
following, then you'd be good.
#cloud-config preferences. d/your. conf
Acquire: :AllowReleaseIn foChange = yes
write_files:
- path: /etc/apt/
content: |
In order to accomplish this, you need either:
a.) support in maas for generic user-supplied cloud-config to enlistment
environment where you could just use write_files.
b.) specific support in maas for 'apt-preferences' configuration to the
enlistment environment and also changes to cloud-init to expose
'apt-preferences' configuration.
Both of these require some change in MAAS (or just answering "here is how you do 'a'" above.