Skip to content

noplanman/ansible-role-apt-cacher-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role for Apt-Cacher NG

Build Status Ansible Role


🚀 Development has moved to gitlab.com.

(The repository on GitHub is only a mirror, so fork on GitLab to contribute.)


Installs and configures Apt-Cacher NG on Debian/Ubuntu servers and respective clients.

Requirements

For clients, a running Apt-Cacher NG server they can connect to.

Role Variables

See the defaults/main.yml file for more details.

Main variables:

# Define this in your playbook to set up on client.
# apt_cacher_ng_server: "1.1.1.1"

apt_cacher_ng_bind_address: "0.0.0.0"
apt_cacher_ng_port: "3142"
apt_cacher_ng_report_page: "acng-report.html"
apt_cacher_ng_cache_dir: "/var/cache/apt-cacher-ng"

Role Tags

Each part of the setup has a tag.

apt-cacher-ng:install
apt-cacher-ng:configure
apt-cacher-ng:client

Dependencies

None.

Example Playbook

# playbook.yml
---
- hosts: servers
  become: yes
  vars_files:
    - vars/main.yml
  roles:
    - { role: noplanman.apt_cacher_ng }
# vars/main.yml (server)
---
apt_cacher_ng_port: "3142"
apt_cacher_ng_cache_dir: "/var/cache/apt-cacher-ng"
apt_cacher_ng_log_dir: "/var/log/apt-cacher-ng"
# vars/main.yml (client)
---
apt_cacher_ng_server: "1.1.1.1"
apt_cacher_ng_port: "3142"

Tests

Docker is used to test the role with different operating systems.

Check the tests folder.

License

MIT