progmaticltd / homebox

A set of ansible scripts to build a personal mail server / private cloud / etc.
https://homebox.space/
GNU General Public License v3.0
461 stars 52 forks source link

Allow apt mirrors #375

Open diffway opened 4 months ago

progmaticltd commented 4 months ago

Again, thanks for this MR, that could be useful to many users.

Would you mind extending this idea a little, please ?

Again, thanks for your idea, I never thought about this.

diffway commented 4 months ago
  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] **** ...



3. Added to section [System settings](https://homebox.readthedocs.io/en/main/30-define-your-config/#create-the-blank-configuration)  which is IMO self descriptive. Also I'am not sure how to rebuild `readthedocs`.
progmaticltd commented 4 months ago

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

diffway commented 3 months ago

@progmaticltd, I've implemented everything as discussed.

arodier commented 3 months ago

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 commented 3 months ago

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