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:
|
{%- from "apt/map.jinja" import apt with context %}
|
||||||
file.append:
|
{% for k, v in apt.config.items() -%}
|
||||||
- name: /etc/apt/apt.conf.d/99-unauth
|
apt-proxy-{{ k }}:
|
||||||
- text: 'APT::Get::AllowUnauthenticated "true";'
|
file.managed:
|
||||||
|
- name: /etc/apt/apt.conf.d/{{ k }}
|
||||||
apt-aptitude-install:
|
- user: root
|
||||||
pkg.latest:
|
- group: root
|
||||||
- pkgs:
|
- mode: 0644
|
||||||
- aptitude
|
- contents: {{ v.content }}
|
||||||
- apt-transport-https
|
{% endfor -%}
|
||||||
#
|
|
||||||
# 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
|
|
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