No description
Find a file
Mark van Huijstee ca2b980e79
Merge pull request #18 from de-it-krachten/dev
Update supported platforms & CI (2026-07-23)
2026-07-26 21:50:16 +02:00
.github/workflows Update CI 2026-07-22 22:55:54 +02: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 CI 2026-07-25 16:13:06 +02:00
tasks feat: Add support for ansible-core 2.20+ 2026-06-07 16:24:20 +02:00
.ansible-lint Update CI 2026-06-07 16:38:46 +02:00
.cicd Update CI 2026-06-09 10:39:52 +02:00
.cicd.overwrite Update CI 2026-06-08 18:46:22 +02: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.4.0 [skip ci] 2026-07-23 17:17:06 +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