heavy repo refactoring
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
include:
|
||||
- .repo
|
||||
- .packages
|
||||
- .cron
|
||||
|
||||
|
||||
39
os/armbian/repo.sls
Normal file
39
os/armbian/repo.sls
Normal file
@@ -0,0 +1,39 @@
|
||||
#!jinja|yaml|gpg
|
||||
|
||||
{% set base_url = 'mirrors.dotsrc.org' %}
|
||||
|
||||
|
||||
{%-
|
||||
set cache_url = salt['pillar.get'](
|
||||
'services:apt-cache',
|
||||
default=''
|
||||
)
|
||||
%}
|
||||
|
||||
{%-
|
||||
set os_rel = salt['pillar.get'](
|
||||
'os:release',
|
||||
default=False
|
||||
)
|
||||
%}
|
||||
|
||||
{% if not os_rel %}
|
||||
{% set os_rel = grains['oscodename'] %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
repo_armbian:
|
||||
pkgrepo.managed:
|
||||
- name: 'deb http://{{ cache_url }}{{ base_url }}/armbian-apt {{ os_rel }} main {{ os_rel }}-utils #{{ os_rel }}-desktop'
|
||||
- dist: {{ os_rel }}
|
||||
- file: /etc/apt/sources.list.d/armbian.list
|
||||
- clean_file: True
|
||||
|
||||
pin_repo_armbian:
|
||||
file.managed:
|
||||
- name: /etc/apt/apt.conf.d/999_pin_repo_armbian
|
||||
- contents: |
|
||||
#SALT Managed
|
||||
Package: *
|
||||
Pin: origin {{ cache_url }}{{ base_url }}
|
||||
Pin-Priority: 1001
|
||||
Reference in New Issue
Block a user