apt-proxy for known hardware types

This commit is contained in:
do
2020-07-02 14:43:04 +02:00
parent b763a8dbc2
commit 9ce858d691
3 changed files with 23 additions and 1 deletions

10
hardware/common/apt.sls Normal file
View File

@@ -0,0 +1,10 @@
apt-proxy:
file.managed:
- name: /etc/apt/apt.conf.d/proxy
- contents: |
# SALT managed
Acquire::http::proxy "http://apt-cache.lan:3142";
Acquire::ftp::proxy "http://apt-cache.lan:3142";

11
hardware/common/init.sls Normal file
View File

@@ -0,0 +1,11 @@
{%
set hardwaretype = salt['grains.get'](
'hardware',
default={}
)
%}
include:
{%- if 'unknown' not in hardwaretype %}
- .apt
{%- endif %}

View File

@@ -1,4 +1,5 @@
{% if grains['hardware'] == 'RaspberryPi' %}
include:
- .common
{% if grains['hardware'] == 'RaspberryPi' %}
- .raspberrypi
{% endif %}