Change-Id: I1e190f1f5b34a049335efbecffad3dddf7c41644pull/128/head
@@ -626,6 +626,21 @@ Remove all repositories: | |||
system: | |||
purge_repos: true | |||
Setup custom apt config options: | |||
.. code-block:: yaml | |||
linux: | |||
system: | |||
apt: | |||
config: | |||
compression-workaround: | |||
"Acquire::CompressionTypes::Order": "gz" | |||
docker-clean: | |||
"DPkg::Post-Invoke": | |||
- "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true" | |||
"APT::Update::Post-Invoke": | |||
- "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true" | |||
RC | |||
~~ |
@@ -0,0 +1,9 @@ | |||
// apt.conf file managed by salt-minion | |||
// DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN | |||
{%- for key, value in config.iteritems() %} | |||
{{ key }} {% if value is iterable and value is not string %}{ {% for entry in value %}"{{ entry }}";{% endfor %} } {% else %}{{ value }};{% endif %} | |||
{%- endfor %} | |||
{#- | |||
vim: syntax=jinja | |||
-#} |
@@ -0,0 +1,27 @@ | |||
{%- from "linux/map.jinja" import system with context %} | |||
{%- if system.enabled %} | |||
{%- if grains.os_family == 'Debian' %} | |||
{%- if system.repo|length > 0 %} | |||
include: | |||
- linux.system.repo | |||
{%- endif %} | |||
{%- for key, config in system.apt.get('config', {}).iteritems() %} | |||
linux_apt_conf_{{ key }} | |||
file.managed: | |||
- name: /etc/apt/apt.conf.d/99{{ key }}-salt: | |||
- template: jinja | |||
- source: salt://linux/files/apt.conf | |||
- defaults: | |||
config: {{ config|yaml }} | |||
{%- if system.repo|length > 0 %} | |||
- require_in: | |||
- pkg: linux_repo_prereq_pkgs | |||
{%- endif %} | |||
{%- endfor %} | |||
{%- endif %} | |||
{%- endif %} |
@@ -99,3 +99,6 @@ include: | |||
{%- if system.directory is defined %} | |||
- linux.system.directory | |||
{%- endif %} | |||
{%- if system.apt is defined and grains.os_family == 'Debian' %} | |||
- linux.system.apt | |||
{%- endif %} |