mirror of
https://github.com/de-it-krachten/ansible-role-apt_local
synced 2026-05-14 11:41:43 +00:00
No description
- Jinja 100%
|
|
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| .ansible-lint | ||
| .cicd | ||
| .cicd.overwrite | ||
| .collections | ||
| .gitignore | ||
| .releaserc.yml | ||
| .roles | ||
| .yamllint | ||
| CHANGELOG.md | ||
| README.md | ||
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