Browse Source

[apt/repositories] add opts for repo name

Fixes #30
master
Arthur Lutz 7 years ago
parent
commit
cf426433a4
2 changed files with 6 additions and 1 deletions
  1. +2
    -1
      apt/repositories.sls
  2. +4
    -0
      pillar.example

+ 2
- 1
apt/repositories.sls View File

{%- set r_arch = '[arch=' ~ args.arch|join(',') ~ ']' if args.arch is defined else '' %} {%- set r_arch = '[arch=' ~ args.arch|join(',') ~ ']' if args.arch is defined else '' %}
{%- set r_url = args.url or default_url %} {%- set r_url = args.url or default_url %}
{%- set r_distro = args.distro or 'stable' %} {%- set r_distro = args.distro or 'stable' %}
{%- set r_opts = args.opts or '' %}
{%- set r_comps = args.comps|default(['main'])|join(' ') %} {%- set r_comps = args.comps|default(['main'])|join(' ') %}
{%- set r_keyserver = args.keyserver if args.keyserver is defined else apt_map.default_keyserver %} {%- set r_keyserver = args.keyserver if args.keyserver is defined else apt_map.default_keyserver %}




{{ r_type }} {{ repo }}: {{ r_type }} {{ repo }}:
pkgrepo.managed: pkgrepo.managed:
- name: {{ r_type }} {{ r_arch }} {{ r_url }} {{ r_distro }} {{ r_comps }}
- name: {{ r_type }} {{ r_arch }} {{ r_opts }} {{ r_url }} {{ r_distro }} {{ r_comps }}
- file: {{ sources_list_dir }}/{{ repo }}-{{ type }}.list - file: {{ sources_list_dir }}/{{ repo }}-{{ type }}.list
{# You can use either keyid+keyserver or key_url. If both are provided {# You can use either keyid+keyserver or key_url. If both are provided
the latter will be used. #} the latter will be used. #}

+ 4
- 0
pillar.example View File

arch: [i386, amd64] arch: [i386, amd64]
keyid: 1C61A2656FB57B7E4DE0F4C1FC918B335044912E keyid: 1C61A2656FB57B7E4DE0F4C1FC918B335044912E
keyserver: hkp://pgp.mit.edu:80 keyserver: hkp://pgp.mit.edu:80
intranet:
distro: stretch
url: http://intranet.example.org
opts: "[trusted=yes]"


preferences: preferences:
00-rspamd: 00-rspamd:

Loading…
Cancel
Save