updated repos state

This commit is contained in:
Paul 2020-08-30 16:52:10 +02:00
parent 91ed6cec51
commit e74f591f6f

View File

@ -2,7 +2,7 @@
{%- for repo in pillar.get('repos') %} {%- for repo in pillar.get('repos') %}
{%- if repo['enabled'] %} {%- if repo['enabled'] %}
pkg-repo-{{ repo['name'] }}: repo-{{ repo['name'] }}:
pkgrepo.managed: pkgrepo.managed:
- humanname: {{ repo['humanname'] }} - humanname: {{ repo['humanname'] }}
{%- if repo['ppa'] %} {%- if repo['ppa'] %}
@ -10,9 +10,10 @@ pkg-repo-{{ repo['name'] }}:
- dist: {{ repo['dist'] }} - dist: {{ repo['dist'] }}
{%- elif not repo['ppa'] %} {%- elif not repo['ppa'] %}
- name: {{ repo['src'] }} - name: {{ repo['src'] }}
- gpgcheck: {{ repo['gpgcheck'] }} - gpgcheck: {{ repo['gpgcheck']|default(1) }}
- file: {{ repo['file'] }} - file: {{ repo['file'] }}
- clean_file: True - clean_file: True
{%- if repo['key_method'] is defined %}
{%- if repo['key_method'] == 'file' %} {%- if repo['key_method'] == 'file' %}
- key_url: {{ repo['key_url'] }} - key_url: {{ repo['key_url'] }}
{%- elif repo['key_method'] == 'server' %} {%- elif repo['key_method'] == 'server' %}
@ -20,10 +21,11 @@ pkg-repo-{{ repo['name'] }}:
- keyserver: {{ repo['keyserver'] }} - keyserver: {{ repo['keyserver'] }}
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{%- endif %}
- refresh: True - refresh: True
{%- else %} {%- else %}
pkg-repo-{{ repo['name'] }}: repo-{{ repo['name'] }}:
file.absent: file.absent:
{%- if not repo['ppa'] %} {%- if not repo['ppa'] %}
- name: {{ repo['file'] }} - name: {{ repo['file'] }}