Make Debian use pkgrepo.managed and allow the repo name and key_url to be overridden via Pillar lookup.
This commit is contained in:
parent
b00844fbe4
commit
87f3e849d2
@ -10,6 +10,8 @@ that differ from whats in defaults.yaml
|
|||||||
##}
|
##}
|
||||||
{% set os_family_map = salt['grains.filter_by']({
|
{% set os_family_map = salt['grains.filter_by']({
|
||||||
'Debian': {
|
'Debian': {
|
||||||
|
'pkgrepo': 'deb http://debian.saltstack.com/debian ' + salt['grains.get']('oscodename') + '-saltstack main',
|
||||||
|
'key_url': 'salt://' + slspath + '/saltstack.gpg',
|
||||||
'libgit2': 'libgit2-22',
|
'libgit2': 'libgit2-22',
|
||||||
'gitfs': {
|
'gitfs': {
|
||||||
'pygit2': {
|
'pygit2': {
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
|
{% from "salt/map.jinja" import salt_settings with context %}
|
||||||
|
|
||||||
drop-saltstack-pkgrepo:
|
drop-saltstack-pkgrepo:
|
||||||
|
pkgrepo.absent:
|
||||||
|
- name: {{ salt_settings.pkgrepo }}
|
||||||
file.absent:
|
file.absent:
|
||||||
- name: /etc/apt/sources.list.d/saltstack.list
|
- name: /etc/apt/sources.list.d/saltstack.list
|
||||||
|
|
||||||
|
@ -1,21 +1,11 @@
|
|||||||
saltstack-apt-key:
|
{% from "salt/map.jinja" import salt_settings with context %}
|
||||||
file.managed:
|
|
||||||
- name: /etc/apt/trusted.gpg.d/saltstack.gpg
|
|
||||||
- source: salt://{{ slspath }}/saltstack.gpg
|
|
||||||
- user: root
|
|
||||||
- group: root
|
|
||||||
- mode: 644
|
|
||||||
|
|
||||||
saltstack-pkgrepo:
|
saltstack-pkgrepo:
|
||||||
file.managed:
|
pkgrepo.managed:
|
||||||
- name: /etc/apt/sources.list.d/saltstack.list
|
- humanname: SaltStack Debian Repo
|
||||||
- source: salt://{{ slspath }}/sources.list
|
- name: {{ salt_settings.pkgrepo }}
|
||||||
- user: root
|
- file: /etc/apt/sources.list.d/saltstack.list
|
||||||
- group: root
|
- key_url: {{ salt_settings.key_url }}
|
||||||
- mode: 644
|
|
||||||
- template: jinja
|
|
||||||
- require:
|
|
||||||
- file: saltstack-apt-key
|
|
||||||
# Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}"
|
# Order: 1 because we can't put a require_in on "pkg: salt-{master,minion}"
|
||||||
# because we don't know if they are used.
|
# because we don't know if they are used.
|
||||||
- order: 1
|
- order: 1
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
# saltstack
|
|
||||||
deb http://debian.saltstack.com/debian {{ grains['oscodename'] }}-saltstack main
|
|
Loading…
Reference in New Issue
Block a user