apt-proxy for known hardware types
This commit is contained in:
10
hardware/common/apt.sls
Normal file
10
hardware/common/apt.sls
Normal 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
11
hardware/common/init.sls
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{%
|
||||||
|
set hardwaretype = salt['grains.get'](
|
||||||
|
'hardware',
|
||||||
|
default={}
|
||||||
|
)
|
||||||
|
%}
|
||||||
|
|
||||||
|
include:
|
||||||
|
{%- if 'unknown' not in hardwaretype %}
|
||||||
|
- .apt
|
||||||
|
{%- endif %}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{% if grains['hardware'] == 'RaspberryPi' %}
|
|
||||||
include:
|
include:
|
||||||
|
- .common
|
||||||
|
{% if grains['hardware'] == 'RaspberryPi' %}
|
||||||
- .raspberrypi
|
- .raspberrypi
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user