Use consistent rewrite of repositories across all packages

This commit is contained in:
unman 2024-02-12 23:22:59 +00:00
parent 71209ecb8d
commit 7769227c3a
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
4 changed files with 40 additions and 4 deletions

View File

@ -3,11 +3,21 @@
# #
{% if salt['pillar.get']('update_proxy:caching') %} {% if salt['pillar.get']('update_proxy:caching') %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl:
file.replace:
- name: {{ repo }}
- pattern: 'https://'
- repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endfor %}
update_sources: update_sources:
file.replace: file.replace:
- names: - names:
- /etc/apt/sources.list - /etc/apt/sources.list
- /etc/apt/sources.list.d/qubes-r4.list
- pattern: 'https:' - pattern: 'https:'
- repl: 'http://HTTPS/' - repl: 'http://HTTPS/'
- flags: [ 'IGNORECASE', 'MULTILINE' ] - flags: [ 'IGNORECASE', 'MULTILINE' ]

View File

@ -4,12 +4,21 @@
{% if grains['nodename'] != 'dom0' %} {% if grains['nodename'] != 'dom0' %}
{% if salt['pillar.get']('update_proxy:caching') %} {% if salt['pillar.get']('update_proxy:caching') %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl:
file.replace:
- name: {{ repo }}
- pattern: 'https://'
- repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endfor %}
/etc/apt/sources.list: /etc/apt/sources.list:
file.replace: file.replace:
- names: - names:
- /etc/apt/sources.list - /etc/apt/sources.list
- /etc/apt/sources.list.d/qubes-r4.list
- pattern: 'https://' - pattern: 'https://'
- repl: 'http://HTTPS///' - repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ] - flags: [ 'IGNORECASE', 'MULTILINE' ]

View File

@ -2,12 +2,21 @@
# #
{% if grains['nodename'] != 'dom0' %} {% if grains['nodename'] != 'dom0' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl:
file.replace:
- name: {{ repo }}
- pattern: 'https://'
- repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endfor %}
/etc/apt/sources.list: /etc/apt/sources.list:
file.replace: file.replace:
- names: - names:
- /etc/apt/sources.list - /etc/apt/sources.list
- /etc/apt/sources.list.d/qubes-r4.list
- pattern: 'http://HTTPS///' - pattern: 'http://HTTPS///'
- repl: 'https://' - repl: 'https://'
- flags: [ 'IGNORECASE', 'MULTILINE' ] - flags: [ 'IGNORECASE', 'MULTILINE' ]

View File

@ -1,12 +1,20 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : # vim: set syntax=yaml ts=2 sw=2 sts=2 et :
{% if salt['pillar.get']('update_proxy:caching') %} {% if salt['pillar.get']('update_proxy:caching') %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl:
file.replace:
- name: {{ repo }}
- pattern: 'https://'
- repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endfor %}
/etc/apt/sources.list: /etc/apt/sources.list:
file.replace: file.replace:
- names: - names:
- /etc/apt/sources.list - /etc/apt/sources.list
- /etc/apt/sources.list.d/qubes-r4.list
- pattern: 'https:' - pattern: 'https:'
- repl: 'http://HTTPS/' - repl: 'http://HTTPS/'
- flags: [ 'IGNORECASE', 'MULTILINE' ] - flags: [ 'IGNORECASE', 'MULTILINE' ]