No matter what I do I cannot get a custom apt_sources in cloud config to work. If I just add something like:
apt_sources:
- source: "ppa:smoser/ppa"
I get the following in the cloud-init.log:
Dec 21 00:32:31 ubuntu1404x64 [CLOUDINIT] cc_apt_configure.py[DEBUG]: Skipping module named apt_configure, no package 'mirror' located
If I then add a “mirror” section to the cloud config I get:
apt_mirror: http://us.archive.ubuntu.com/ubuntu
The error is:
Dec 21 00:41:59 ubuntu1404x64 [CLOUDINIT] util.py[DEBUG]: Running apt_configure (<module 'cloudinit.config.cc_apt_configure' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.pyc'>) failed#012Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 658, in _run_modules#012 cc.run(run_name, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/cloud.py", line 63, in run#012 return self._runners.run(name, functor, args, freq, clear_on_fail)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/helpers.py", line 197, in run#012 results = functor(*args)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.py", line 55, in handle#012 mirrors = find_apt_mirror_info(cloud, cfg)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.py", line 265, in find_apt_mirror_info#012 mirror_info.update({'primary': mirror})#012AttributeError: 'str' object has no attribute 'update'
Any ideas?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I’m glad to say that a fix for this has been released. Using apt_sources should now work as expected.
Thanks for bringing this to our attention!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.