Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow apt mirrors #375

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Conversation

diffway
Copy link
Contributor

@diffway diffway commented Apr 6, 2024

No description provided.

@progmaticltd
Copy link
Owner

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.org by another mirror, then we need to organise this differently, IMHO. For instance, by creating a mirror variable, with the default being deb.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.

@diffway diffway force-pushed the allow-apt-mirrors branch from a5ca7af to 029bff1 Compare April 8, 2024 19:30
@diffway
Copy link
Contributor Author

diffway commented Apr 8, 2024

  1. Added mirror variable to 'system settings' of each config/defaults/version-*.yml file, added discriptive comment.

  2. My skills at ansible are 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] ************************************
...
  1. Added to section System settings which is IMO self descriptive. Also I'am not sure how to rebuild readthedocs.

@progmaticltd
Copy link
Owner

Thank you!
Sorry for the late answer, I will check this asap.

roles/bootstrap/tasks/check/apt.yml Outdated Show resolved Hide resolved
roles/bootstrap/tasks/install/apt.yml Outdated Show resolved Hide resolved
roles/bootstrap/vars/main.yml Outdated Show resolved Hide resolved
@diffway
Copy link
Contributor Author

diffway commented May 9, 2024

@progmaticltd, I've implemented everything as discussed.

@arodier
Copy link
Collaborator

arodier commented May 25, 2024

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.

@arodier
Copy link
Collaborator

arodier commented May 30, 2024

Actually, don't do anything, I can automatically detect if the mirror is only compatible with http and write the template accordingly.

@diffway diffway changed the base branch from main to dev December 27, 2024 09:33
@diffway
Copy link
Contributor Author

diffway commented Dec 27, 2024

@arodier could you kindly make a decision about those conflicts?
I honestly doesn't understand what I'm supposed to do:

the file docs/30-define-your-config.md is gone in progmaticltd:dev
the file roles/bootstrap/vars/main.yml looks fine to me.

@arodier
Copy link
Collaborator

arodier commented Dec 28, 2024

Sorry, I neglected this issue, I will come back to it in a few days, during holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants