updated apt state
This commit is contained in:
parent
b28cc4c7c0
commit
86ba135f3a
@ -1,3 +0,0 @@
|
||||
{%- if salt['pillar.get']('apt-proxy:name') != "None" %}
|
||||
Acquire::http { proxy "http://{{salt['pillar.get']('apt-proxy:name')}}:{{ salt['pillar.get']('apt-proxy:port')}}" }
|
||||
{%- endif %}
|
13
states/apt/defaults.yaml
Normal file
13
states/apt/defaults.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apt:
|
||||
config: {}
|
||||
|
||||
# apt:
|
||||
# config:
|
||||
# 10proxy:
|
||||
# content:
|
||||
# - Acquire::http::Proxy "http://proxy:8000";
|
||||
# - Acquire::https::Proxy "DIRECT";
|
||||
# 99unauth:
|
||||
# content:
|
||||
# - APT::Get::AllowUnauthenticated "true";
|
@ -1,28 +1,11 @@
|
||||
---
|
||||
apt-unauth:
|
||||
file.append:
|
||||
- name: /etc/apt/apt.conf.d/99-unauth
|
||||
- text: 'APT::Get::AllowUnauthenticated "true";'
|
||||
|
||||
apt-aptitude-install:
|
||||
pkg.latest:
|
||||
- pkgs:
|
||||
- aptitude
|
||||
- apt-transport-https
|
||||
#
|
||||
# apt-upgrade:
|
||||
# pkg.uptodate:
|
||||
# - refresh: true
|
||||
#
|
||||
#apt-cacher-ng-proxy:
|
||||
# file.managed:
|
||||
# - name: /etc/apt/apt.conf.d/10proxy
|
||||
# - source: salt://apt/10proxy.j2
|
||||
# - user: root
|
||||
# - group: root
|
||||
# - mode: 0644
|
||||
# - template: jinja
|
||||
#
|
||||
# apt-cacher-ng-proxy-delete:
|
||||
# file.absent:
|
||||
# - name: /etc/apt/apt.conf.d/10proxy
|
||||
{%- from "apt/map.jinja" import apt with context %}
|
||||
{% for k, v in apt.config.items() -%}
|
||||
apt-proxy-{{ k }}:
|
||||
file.managed:
|
||||
- name: /etc/apt/apt.conf.d/{{ k }}
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 0644
|
||||
- contents: {{ v.content }}
|
||||
{% endfor -%}
|
5
states/apt/map.jinja
Normal file
5
states/apt/map.jinja
Normal file
@ -0,0 +1,5 @@
|
||||
{%- import_yaml "apt/defaults.yaml" as default_settings %}
|
||||
|
||||
{%- set defaults = salt['grains.filter_by'](default_settings, default='apt') %}
|
||||
|
||||
{%- set apt = salt['pillar.get']('apt', default=defaults, merge=True) %}
|
Loading…
Reference in New Issue
Block a user