2019-08-05 07:18:03 -04:00
|
|
|
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2022-05-15 10:30:51 -04:00
|
|
|
{% if grains['os_family']|lower == 'debian' %}
|
2022-07-16 10:19:09 -04:00
|
|
|
{% 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' ]
|
2022-08-19 06:47:13 -04:00
|
|
|
- backup: False
|
|
|
|
|
2022-07-16 10:19:09 -04:00
|
|
|
{% endfor %}
|
|
|
|
|
2022-05-15 10:30:51 -04:00
|
|
|
/etc/apt/sources.list:
|
|
|
|
file.replace:
|
2022-07-16 10:19:09 -04:00
|
|
|
- name: /etc/apt/sources.list
|
2022-05-15 10:30:51 -04:00
|
|
|
- pattern: 'https:'
|
|
|
|
- repl: 'http://HTTPS/'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
2022-08-19 06:47:13 -04:00
|
|
|
- backup: False
|
2019-08-05 07:18:03 -04:00
|
|
|
|
2022-05-15 10:30:51 -04:00
|
|
|
{% elif grains['os_family']|lower == 'arch' %}
|
|
|
|
pacman:
|
|
|
|
file.replace:
|
|
|
|
- names:
|
|
|
|
- /etc/pacman.d/mirrorlist
|
|
|
|
- /etc/pacman.d/99-qubes-repository-4.1.conf.disabled
|
|
|
|
- pattern: 'https:'
|
|
|
|
- repl: 'http://HTTPS/'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
2022-08-19 06:47:13 -04:00
|
|
|
- backup: False
|
2022-05-15 10:30:51 -04:00
|
|
|
|
|
|
|
{% elif grains['os_family']|lower == 'redhat' %}
|
2022-07-16 10:19:09 -04:00
|
|
|
{% for repo in salt['file.find']('/etc/yum.repos.d/', name='*repo*') %}
|
|
|
|
{{ repo }}_baseurl:
|
2022-05-15 10:30:51 -04:00
|
|
|
file.replace:
|
2022-07-16 10:19:09 -04:00
|
|
|
- name: {{ repo }}
|
2022-08-19 06:47:13 -04:00
|
|
|
- pattern: 'baseurl(.*)https://'
|
|
|
|
- repl: 'baseurl\1http://HTTPS///'
|
2022-07-16 10:19:09 -04:00
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
2022-08-19 06:47:13 -04:00
|
|
|
- backup: False
|
2022-07-16 10:19:09 -04:00
|
|
|
{{ repo }}_metalink:
|
|
|
|
file.replace:
|
|
|
|
- name: {{ repo }}
|
2022-05-15 10:30:51 -04:00
|
|
|
- pattern: 'metalink=https://(.*)basearch'
|
|
|
|
- repl: 'metalink=http://HTTPS///\1basearch&protocol=http'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
2022-08-19 06:47:13 -04:00
|
|
|
- backup: False
|
2022-07-16 10:19:09 -04:00
|
|
|
|
|
|
|
{% endfor %}
|
2022-05-15 10:30:51 -04:00
|
|
|
{% endif %}
|