Bladeren bron

FreeBSD support for apt-cacher.ng.server

tags/v0.5.0^2
Alexander Weidinger 6 jaren geleden
bovenliggende
commit
4e61d20af9
4 gewijzigde bestanden met toevoegingen van 43 en 4 verwijderingen
  1. +3
    -1
      README.rst
  2. +1
    -0
      apt-cacher/ng/defaults.yaml
  3. +13
    -0
      apt-cacher/ng/osfamilymap.yaml
  4. +26
    -3
      apt-cacher/ng/server.sls

+ 3
- 1
README.rst Bestand weergeven

@@ -36,7 +36,9 @@ Sets up the system to use the apt-cacher server as the caching proxy
``apt-cacher.ng.server``
-------

Install and configure apt-cacher-ng
Install and configure apt-cacher-ng.

Supports Debian(ish) distributions and FreeBSD.

``apt-cacher.ng.client``
------------

+ 1
- 0
apt-cacher/ng/defaults.yaml Bestand weergeven

@@ -8,6 +8,7 @@ apt_cacher_ng:
server_log_dir: /var/log/apt-cacher-ng
user: apt-cacher-ng
group: apt-cacher-ng
root_group: root
pkg: apt-cacher-ng
service: apt-cacher-ng
credentials: /etc/apt-cacher-ng/security.conf

+ 13
- 0
apt-cacher/ng/osfamilymap.yaml Bestand weergeven

@@ -1 +1,14 @@
Debian: {}
FreeBSD:
credentials: /usr/local/etc/apt-cacher-ng/security.conf
root_group: wheel
server_cache_dir: /var/cache/apt-cacher-ng
server_config: /usr/local/etc/apt-cacher-ng/zzz_acng.conf
server_log_dir: /var/log/apt-cacher-ng
service: apt_cacher_ng
##
# We stick to the Debian user name in order to
# further separate apt-cacher-ng from other potentially present
# services running as 'proxy'.
#user: proxy
#group: proxy

+ 26
- 3
apt-cacher/ng/server.sls Bestand weergeven

@@ -1,4 +1,3 @@
{% if grains['os_family'] == 'Debian' %}
{% from "apt-cacher/ng/map.jinja" import apt_cacher_ng with context %}

{%- if 'include' in apt_cacher_ng %}
@@ -8,6 +7,31 @@ include:
{%- endfor %}
{%- endif %}

apt-cacher-ng-group:
group.present:
- name: {{ apt_cacher_ng.group }}
- require:
- pkg: apt-cacher-ng
- watch_in:
- service: apt-cacher-ng

apt-cacher-ng-user:
user.present:
- name: {{ apt_cacher_ng.user }}
- require:
- group: apt-cacher-ng-group
- watch_in:
- service: apt-cacher-ng

{%- if grains['os_family'] == 'FreeBSD' %}
apt-cacher-ng-sysrc-user:
sysrc.managed:
- name: apt_cacher_ng_user
- value: "{{ apt_cacher_ng.user }}"
- watch_in:
- service: apt-cacher-ng
{%- endif %}

apt-cacher-ng:
pkg.installed:
- name: {{ apt_cacher_ng.pkg }}
@@ -36,7 +60,7 @@ apt-cacher-ng:
{{ apt_cacher_ng.server_config }}:
file.managed:
- user: root
- group: root
- group: {{ apt_cacher_ng.root_group }}
- mode: '644'
- source: salt://apt-cacher/ng/files/server.conf
- template: jinja
@@ -62,4 +86,3 @@ apt-cacher-ng:
- mode: '600'
- source: salt://apt-cacher/ng/files/security.conf
- template: jinja
{% endif %}

Laden…
Annuleren
Opslaan