homebox
homebox copied to clipboard
Allow apt mirrors
Again, thanks for this MR, that could be useful to many users.
Would you mind extending this idea a little, please ?
- If we want to let the user replace
deb.debian.orgby another mirror, then we need to organise this differently, IMHO. For instance, by creating amirrorvariable, with the default beingdeb.debian.org, and then, allow the users to override them. - Second, as this is a very sensitive value, then I would like to check that the value is valid before deploying the sources.list file, for instance by downloading first the release file (e.g.
https://debian.mirror.serversaustralia.com.au/debian/dists/bookworm/Release) - Last but not least, documentation will need to mention this at least.
Again, thanks for your idea, I never thought about this.
-
Added
mirrorvariable to 'system settings' of eachconfig/defaults/version-*.ymlfile, added discriptive comment. -
My skills at
ansibleare not very strong, so maybe checking code could be done more efficiently, but it passes:
ROLE=bootstrap ansible-playbook -e version=small check.yml
...
TASK [bootstrap : Initialise and update the packages repository] ***********************************
included: ~/Projects/homebox-all/homebox/roles/bootstrap/tasks/check/apt.yml for homebox
TASK [bootstrap : Check apt mirror is valid for us] ************************************************
ok: [homebox] => (item=bookworm)
ok: [homebox] => (item=bookworm-updates)
ok: [homebox] => (item=bookworm-backports)
TASK [bootstrap : Check if we can run apt update without error] ************************************
...
- Added to section System settings which is IMO self descriptive. Also I'am not sure how to rebuild
readthedocs.
Thank you! Sorry for the late answer, I will check this asap.
@progmaticltd, I've implemented everything as discussed.
Hello, diffway, sorry for the late answer.
Thank you very much, I am testing it right now, and I will come back to you.
The only issue I found so far, is the fact that https does not work with all the mirrors.
Actually, don't do anything, I can automatically detect if the mirror is only compatible with http and write the template accordingly.