34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
{% from "salt/map.jinja" import salt_daemons with context %}
|
|
{% from "salt/deb_install/map.jinja" import osrelease, oscodename with context %}
|
|
|
|
/etc/apt/keyrings/salt-archive-keyring-2023.gpg:
|
|
file.managed:
|
|
- source: https://repo.saltproject.io/salt/py3/{{ grains['os'].lower() }}/{{ osrelease }}/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
|
|
- source_hash: c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472
|
|
|
|
/etc/apt/sources.list.d/salt.list:
|
|
file.managed:
|
|
- contents: "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg arch=amd64] https://repo.saltproject.io/salt/py3/{{ grains['os'].lower() }}/{{ osrelease }}/amd64/minor/{{ salt.pillar.get("salt:version") }} {{ oscodename }} main"
|
|
|
|
salt-common:
|
|
pkg.installed:
|
|
- version: '{{ salt.pillar.get("salt:version") }}'
|
|
- refresh: true
|
|
- require:
|
|
- file: /etc/apt/keyrings/salt-archive-keyring-2023.gpg
|
|
- file: /etc/apt/sources.list.d/salt.list
|
|
|
|
{% for daemon in salt_daemons %}
|
|
salt-{{ daemon }}:
|
|
pkg.installed:
|
|
- version: '{{ salt.pillar.get("salt:version") }}'
|
|
- require:
|
|
- pkg: salt-common
|
|
service.running:
|
|
- enable: true
|
|
- require:
|
|
- pkg: salt-{{ daemon }}
|
|
- listen:
|
|
- file: /etc/salt/{{ daemon }}
|
|
{% endfor %}
|