|
|
|
|
|
|
|
|
include: |
|
|
include: |
|
|
- {{ sls_package_install }} |
|
|
- {{ sls_package_install }} |
|
|
|
|
|
|
|
|
apt-cacher-ng/group/create: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/group/create: |
|
|
group.present: |
|
|
group.present: |
|
|
- name: {{ apt_cacher_ng.group }} |
|
|
- name: {{ apt_cacher_ng.group }} |
|
|
|
|
|
|
|
|
apt-cacher-ng/user/create: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/user/create: |
|
|
user.present: |
|
|
user.present: |
|
|
- name: {{ apt_cacher_ng.user }} |
|
|
- name: {{ apt_cacher_ng.user }} |
|
|
|
|
|
|
|
|
{%- if grains['os_family'] == 'FreeBSD' %} |
|
|
{%- if grains['os_family'] == 'FreeBSD' %} |
|
|
apt-cacher-ng/user/sysrc: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/user/sysrc: |
|
|
sysrc.managed: |
|
|
sysrc.managed: |
|
|
- name: apt_cacher_ng_user |
|
|
- name: apt_cacher_ng_user |
|
|
- value: "{{ apt_cacher_ng.user }}" |
|
|
- value: "{{ apt_cacher_ng.user }}" |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
apt-cacher-ng/config/server_config: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/file: |
|
|
file.managed: |
|
|
file.managed: |
|
|
- name: {{ apt_cacher_ng.server_config }} |
|
|
- name: {{ apt_cacher_ng.server_config }} |
|
|
- user: root |
|
|
- user: root |
|
|
- group: {{ apt_cacher_ng.root_group }} |
|
|
- group: {{ apt_cacher_ng.root_group }} |
|
|
- mode: '644' |
|
|
- mode: '644' |
|
|
- source: {{ files_switch(['server.conf.tmpl'], |
|
|
- source: {{ files_switch(['server.conf.tmpl'], |
|
|
lookup='apt-cacher-ng/config/server_config', |
|
|
|
|
|
|
|
|
lookup='apt-cacher/ng/server/config/file', |
|
|
use_subpath=True |
|
|
use_subpath=True |
|
|
) |
|
|
) |
|
|
}} |
|
|
}} |
|
|
|
|
|
|
|
|
- context: |
|
|
- context: |
|
|
apt_cacher_ng: {{ apt_cacher_ng | json }} |
|
|
apt_cacher_ng: {{ apt_cacher_ng | json }} |
|
|
|
|
|
|
|
|
apt-cacher-ng/config/server_cache_dir: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/server_cache_dir: |
|
|
file.directory: |
|
|
file.directory: |
|
|
- name: {{ apt_cacher_ng.server_cache_dir }} |
|
|
- name: {{ apt_cacher_ng.server_cache_dir }} |
|
|
- makedirs: true |
|
|
- makedirs: true |
|
|
|
|
|
|
|
|
- group: {{ apt_cacher_ng.group }} |
|
|
- group: {{ apt_cacher_ng.group }} |
|
|
- mode: '2755' |
|
|
- mode: '2755' |
|
|
|
|
|
|
|
|
apt-cacher-ng/config/server_log_dir: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/server_log_dir: |
|
|
file.directory: |
|
|
file.directory: |
|
|
- name: {{ apt_cacher_ng.server_log_dir }} |
|
|
- name: {{ apt_cacher_ng.server_log_dir }} |
|
|
- makedirs: true |
|
|
- makedirs: true |
|
|
|
|
|
|
|
|
- group: {{ apt_cacher_ng.group }} |
|
|
- group: {{ apt_cacher_ng.group }} |
|
|
- mode: '2755' |
|
|
- mode: '2755' |
|
|
|
|
|
|
|
|
apt-cacher-ng/config/credentials: |
|
|
|
|
|
|
|
|
apt-cacher/ng/server/config/credentials: |
|
|
file.managed: |
|
|
file.managed: |
|
|
- name: {{ apt_cacher_ng.credentials }} |
|
|
- name: {{ apt_cacher_ng.credentials }} |
|
|
- user: {{ apt_cacher_ng.user }} |
|
|
- user: {{ apt_cacher_ng.user }} |
|
|
- group: {{ apt_cacher_ng.group }} |
|
|
- group: {{ apt_cacher_ng.group }} |
|
|
- mode: '600' |
|
|
- mode: '600' |
|
|
- source: {{ files_switch(['security.conf.tmpl'], |
|
|
- source: {{ files_switch(['security.conf.tmpl'], |
|
|
lookup='apt-cacher-ng/config/credentials', |
|
|
|
|
|
|
|
|
lookup='apt-cacher/ng/server/config/credentials', |
|
|
use_subpath=True |
|
|
use_subpath=True |
|
|
) |
|
|
) |
|
|
}} |
|
|
}} |