2019-07-30 00:26:08 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
{% from "salt/map.jinja" import salt_settings with context %}
|
|
|
|
|
2021-09-17 18:44:20 +02:00
|
|
|
salt-pkgrepo-install-saltstack-debian-keyring:
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/share/keyrings/salt-archive-keyring.gpg
|
|
|
|
- source: {{ salt_settings.pkgrepo_keyring }}
|
|
|
|
- source_hash: {{ salt_settings.pkgrepo_keyring_hash }}
|
|
|
|
- require_in:
|
|
|
|
- pkgrepo: salt-pkgrepo-install-saltstack-debian
|
|
|
|
|
|
|
|
salt-pkgrepo-install-saltstack-debian-remove-old-repo-file:
|
|
|
|
file.absent:
|
|
|
|
- name: /etc/apt/sources.list.d/saltstack.list
|
|
|
|
- require_in:
|
|
|
|
- pkgrepo: salt-pkgrepo-install-saltstack-debian
|
|
|
|
|
2019-07-30 00:26:08 +02:00
|
|
|
salt-pkgrepo-install-saltstack-debian:
|
|
|
|
pkgrepo.managed:
|
|
|
|
- humanname: SaltStack Debian Repo
|
|
|
|
- name: {{ salt_settings.pkgrepo }}
|
2021-09-17 18:44:20 +02:00
|
|
|
- file: /etc/apt/sources.list.d/salt.list
|
2021-11-04 15:26:42 +01:00
|
|
|
{% if salt_settings.get('key_url') is not none %}
|
2019-07-30 00:26:08 +02:00
|
|
|
- key_url: {{ salt_settings.key_url }}
|
2021-11-04 15:26:42 +01:00
|
|
|
{% endif %}
|
2019-07-30 00:26:08 +02:00
|
|
|
- clean_file: True
|
2021-09-17 18:44:20 +02:00
|
|
|
# Order: 3 because we can't put a require_in on "pkg: salt-{master,minion}"
|
2019-07-30 00:26:08 +02:00
|
|
|
# because we don't know if they are used.
|
2021-09-17 18:44:20 +02:00
|
|
|
- order: 3
|