You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

54 lines
1.5 KiB

---
{% set codename = grains["oscodename"] -%}
{% set osarch = grains["osarch"] %}
{% if codename != "stretch" %}
/etc/apt/sources.list.d/debian-stretch-backports.list:
file.absent: []
/etc/apt/sources.list.d/debian-stretch-backports-sloppy.list:
file.absent: []
{% endif %}
debian {{ codename }} backports:
pkgrepo.managed:
- humanname: debian-{{ codename }}-backports
- name: deb http://deb.debian.org/debian {{ codename }}-backports main contrib non-free
- dist: {{ codename }}-backports
- file: /etc/apt/sources.list.d/debian-{{ codename }}-backports.list
- onchanges_in:
- module: refresh package database
salt:
pkgrepo.managed:
- humanname: salt
{%- if codename == "stretch" %}
- name: deb http://repo.saltstack.com/py3/debian/9/amd64/latest stretch main
- dist: stretch
{%- elif codename == "buster" %}
- name: deb http://repo.saltstack.com/py3/debian/10/amd64/latest buster main
- dist: buster
{%- endif %}
- file: /etc/apt/sources.list.d/salt.list
- onchanges_in:
- module: refresh package database
hashicorp:
pkgrepo.managed:
- humanname: hashicorp
- name: "deb [arch={{ osarch }}] https://apt.releases.hashicorp.com {{ codename }} main"
- dist: "{{ codename }}"
- file: /etc/apt/sources.list.d/hashicorp.list
- key_url: https://apt.releases.hashicorp.com/gpg
- onchanges_in:
- module: refresh package database
logdna:
pkgrepo.absent:
- onchanges_in:
- module: refresh package database
refresh package database:
module.run:
- pkg.refresh_db: []