No description
Find a file
Mark van Huijstee 97b0b8329c
Merge pull request #12 from de-it-krachten/dev
Update supported platforms & CI (2026-03-14)
2026-03-15 12:35:30 +01:00
.github/workflows Update supported platforms & CI 2026-03-14 19:14:57 +01:00
defaults feat: Add support for rollback to official server 2025-11-01 16:59:33 +01:00
meta Update supported platforms & CI 2025-08-05 01:01:16 +02:00
molecule/default Update supported platforms & CI 2026-03-14 14:30:38 +01:00
tasks feat: Add support for rollback to official server 2025-11-01 16:59:33 +01:00
.ansible-lint Finalize code 2024-04-10 23:47:29 +02:00
.cicd Update CI 2026-03-06 20:53:52 +01:00
.cicd.overwrite Update CI 2026-03-06 20:53:52 +01:00
.collections Finalize code 2024-04-10 23:47:29 +02:00
.gitignore feat: Update supported platforms & CI 2024-12-29 01:07:22 +01:00
.releaserc.yml feat: Add support for rollback to official server 2025-11-01 16:59:33 +01:00
.roles Finalize code 2024-04-10 23:47:29 +02:00
.yamllint feat: Update supported platforms & CI 2024-12-29 01:07:22 +01:00
CHANGELOG.md chore(release): 1.3.0 [skip ci] 2026-03-14 16:27:34 +00:00
README.md Update CI 2026-03-06 20:53:52 +01:00

CI

ansible-role-apt_local

Use alternative/local mirror for Ubuntu packages

Dependencies

Roles

None

Collections

None

Platforms

Supported platforms

  • Ubuntu 20.04 LTS1
  • Ubuntu 22.04 LTS

Note: 1 : no automated testing is performed on these platforms

Role Variables

defaults/main.yml


# local mirror host
apt_local_host: mirror.example.com

# local mirror url
apt_local_mirror: >-
  https://{{ apt_local_host }}/install/ubuntu/mirror/archive.ubuntu.com/ubuntu

# local mirror regex
apt_local_mirror_regex: "{{ apt_local_mirror | replace('\\.', '\\\\.') }}"

# Should local mirror be used
apt_local_use_mirror: true

# Should backports be disabled
apt_local_disable_backports: false

Example Playbook

molecule/default/converge.yml


- name: sample playbook for role 'apt_local'
  hosts: all
  become: 'yes'
  vars:
    molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
    apt_local_host: mirror.hetzner.com
    apt_local_mirror: https://{{ apt_local_host }}/ubuntu
  tasks:
    - name: Include role 'apt_local'
      ansible.builtin.include_role:
        name: apt_local