Skip to content

Commit

Permalink
Improve code.
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Theile <votdev@gmx.de>
  • Loading branch information
votdev committed Apr 13, 2019
1 parent d9af063 commit 6e45b58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deb/openmediavault/srv/salt/omv/deploy/apt/default.sls
Expand Up @@ -97,10 +97,10 @@ remove_apt_sources_list_debian_security:
# Check if the Debian security repository is already configured (e.g.
# in /etc/apt/sources.list). Only add it if this is not the case.
{% set repos = [] %}
{% for key, value in salt['pkg.list_repos']().items() %}
{% set _ = repos.append(value[0]) %}
{% for value in salt['pkg.list_repos']().values() %}
{% set _ = repos.extend(value) %}
{% endfor %}
{% if repos | rejectattr('disabled') | selectattr('type', 'equalto', 'deb') | map(attribute='uri') | unique | select('match', '^https?://security.debian.org/debian-security$') | list | length == 0 %}
{% if repos | rejectattr('disabled') | selectattr('type', 'equalto', 'deb') | selectattr('uri', 'match', '^https?://security.debian.org/debian-security$') | list | length == 0 %}

configure_apt_sources_list_debian_security:
file.managed:
Expand Down

0 comments on commit 6e45b58

Please sign in to comment.