2022-05-15 10:48:23 -04:00
|
|
|
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2022-07-28 12:21:06 -04:00
|
|
|
|
2022-05-15 10:48:23 -04:00
|
|
|
{% if grains['os_family']|lower == 'debian' %}
|
2022-07-28 12:21:06 -04:00
|
|
|
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
|
|
|
|
{{ repo }}_baseurl:
|
|
|
|
file.replace:
|
|
|
|
- name: {{ repo }}
|
|
|
|
- pattern: 'http://HTTPS/'
|
|
|
|
- repl: 'https:'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
{% endfor %}
|
|
|
|
|
2022-05-15 10:48:23 -04:00
|
|
|
/etc/apt/sources.list:
|
|
|
|
file.replace:
|
2022-07-28 12:21:06 -04:00
|
|
|
- name: /etc/apt/sources.list
|
2022-05-15 10:48:23 -04:00
|
|
|
- pattern: 'http://HTTPS/'
|
|
|
|
- repl: 'https:'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
|
|
|
|
{% elif grains['os_family']|lower == 'arch' %}
|
|
|
|
pacman:
|
|
|
|
file.replace:
|
|
|
|
- names:
|
|
|
|
- /etc/pacman.d/mirrorlist
|
|
|
|
- /etc/pacman.d/99-qubes-repository-4.1.conf.disabled
|
2022-07-28 12:21:06 -04:00
|
|
|
- pattern: 'http://HTTPS///'
|
|
|
|
- repl: 'https://'
|
2022-05-15 10:48:23 -04:00
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
|
2022-07-28 12:21:06 -04:00
|
|
|
|
2022-05-15 10:48:23 -04:00
|
|
|
{% elif grains['os_family']|lower == 'redhat' %}
|
2022-07-28 12:21:06 -04:00
|
|
|
{% for repo in salt['file.find']('/etc/yum.repos.d/', name='*repo*') %}
|
|
|
|
{{ repo }}_baseurl:
|
2022-05-15 10:48:23 -04:00
|
|
|
file.replace:
|
2022-07-28 12:21:06 -04:00
|
|
|
- name: {{ repo }}
|
|
|
|
- pattern: 'http://HTTPS/'
|
|
|
|
- repl: 'https:'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
{{ repo }}_metalink:
|
|
|
|
file.replace:
|
|
|
|
- name: {{ repo }}
|
2022-05-15 10:48:23 -04:00
|
|
|
- pattern: 'metalink=http://HTTPS///(.*)basearch&protocol=http'
|
|
|
|
- repl: 'metalink=https://\1basearch'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
|
2022-07-28 12:21:06 -04:00
|
|
|
{% endfor %}
|
2022-05-15 10:48:23 -04:00
|
|
|
{% endif %}
|