adfinis.repo_mirror

ROLE REPO MIRROR

License

Build Status

Galaxy

This Ansible role helps you set up a package mirror.

Requirements

  • You need to use Debian Bullseye.
  • Before using this role, create a storage pool using ZFS or a similar method and mount it where the mirrored repositories will be located.

Role Variables

# vars/Debian.yml
---

# Dependencies to install
repo_mirror_packages:
  - rsync
  - wget
  - logrotate
  - git
  - systemd
# defaults/Debian.yml

# Default user for mirrors
repo_mirror_user: mirror

# Default group for mirrors
repo_mirror_group: mirror

# Base path for the mirror
repo_mirror_base_path: /var/www/mirror

# Default log path
repo_mirror_log_path: /var/log/mirror

# Temporary path for currently downloading files
repo_mirror_tmp_path: /var/www/mirror/tmp

# Default datetime format (e.g., 2017/10/11 22:23:42 CEST)
repo_mirror_datetime_format: "+%Y/%m/%d %T %Z"

# Default bandwidth limit for syncing from remote
repo_mirror_bwlimit: 30MiB

# Default rsync timeout in seconds
repo_mirror_rsync_timeout: 30

# Default max runtime for a sync job (12 hours)
_default_systemd_unit_max_runtime_sec: 43200

# Default state of a systemd timer unit
_default_systemd_timer_enabled: true

# Default state of a systemd timer unit
_default_systemd_timer_unit_state: 'started'

# Default state of a systemd service unit
_default_systemd_service_unit_state: 'stopped'

# Fully Qualified Domain Name (FQDN) of the mirror
repo_mirror_fqdn: 'mirror.example.com'

# Deploy Fedora mirror report script
repo_mirror_fedora_report: false
repo_mirror_fedora_report_name: '<name>'
repo_mirror_fedora_report_pass: '<password>'

# List of Fedora projects to report. Default is empty.
repo_mirror_fedora_reports: []

# List of repositories. Default is empty.
# Examples of defining repositories to mirror
repo_mirror_repos: []

# Example repository definitions
# ...

Dependencies

This role requires the master version of the following role: https://github.com/O1ahmad/ansible-role-systemd

For more details, check the molecule_requirements.yml.

Example Playbook

You can find an example playbook in the molecule default scenario.

License

GPL-3.0

Author Information

The repo_mirror role was created by:

Informazioni sul progetto

Mirror a specified repository

Installa
ansible-galaxy install adfinis.repo_mirror
Licenza
gpl-3.0
Download
583
Proprietario
Potential. Unlocked.