I’m having a little issue here…
I’m trying to create a container with the latest ubuntu-daily and then, with cloud-init, set the content of /etc/environment so that, when it reboots, the proxy is set system-wide:
But it doesn’t work
The envvar are not loaded when I do a “lxc exec ubuntu bash”
(They are loaded when I ssh though)
I tried to do it manually, or to copy it to a temp file before, or into a profile.d file, to no avail.
Is there something I’m doing wrong ?
It could be a formatting issue or something.
When you launch the container, have a look at /var/log/cloud-init-output.log to see whether there are any relevant errors.
Note also that write_files was introduced in a somewhat recent cloud-init. Therefore, perform your tests with Ubuntu 19.10 or newer to be sure it is OK. There is a chance that 18.04 is not new enough.