updated repos state

This commit is contained in:
Paul 2023-03-10 00:08:54 +01:00
parent cc5fa44956
commit c779a0e4e8
2 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,4 @@
---
include:
- .prereqs
- .keyring
- .install

View File

@ -1,29 +1,29 @@
---
{%- from "repos/map.jinja" import repos with context %}
{%- for repo in repos %}
{%- for name,repo in repos.items() %}
{%- if repo.enabled %}
{%- if repo.key_method is defined %}
{%- if repo.key_method == 'file' %}
repo-key-{{ repo.name }}:
repo-key-{{ name }}:
file.managed:
- name: /etc/apt/keyrings/{{ repo.name }}
- name: /etc/apt/keyrings/{{ name }}
- source: {{ repo.key_url }}
- skip_verify: true
{% endif %}
{% endif %}
repo-{{ repo.name }}:
repo-{{ name }}:
pkgrepo.managed:
- humanname: {{ repo.humanname }}
{%- if repo.ppa %}
- ppa: {{ repo.ppasrc }}
- dist: {{ repo.dist }}
{%- else %}
- name: deb [signed-by=/etc/apt/keyrings/{{ repo.name }}] {{ repo.src }} {{ repo.suites }} {{ repo.components }}
- name: deb [signed-by=/etc/apt/keyrings/{{ name }}] {{ repo.src }} {{ repo.suites }} {{ repo.components }}
- gpgcheck: {{ repo.gpgcheck|default(1) }}
- aptkey: false
- file: {{ repo.file }}
- file: /etc/apt/sources.list.d/{{ name }}.list
- clean_file: true
{%- if repo.key_method is defined %}
{%- if repo.key_method == 'file' %}
@ -36,12 +36,11 @@ repo-{{ repo.name }}:
{%- endif %}
{%- else %}
repo-{{ repo.name }}:
repo-{{ name }}:
file.absent:
{%- if not repo.ppa %}
- name: {{ repo.file }}
- name: /etc/apt/sources.list.d/{{ name }}.list
{%- endif %}
{%- endif %}
{%- endfor %}