2024-02-08 18:28:27 -05:00
|
|
|
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
{% if salt['pillar.get']('update_proxy:caching') %}
|
2024-02-11 10:42:52 -05:00
|
|
|
{% set proxy = 'cacher' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if grains['nodename'] != 'dom0' %}
|
2024-02-08 18:28:27 -05:00
|
|
|
{% if grains['os_family']|lower == 'debian' %}
|
|
|
|
{% if grains['nodename']|lower != 'host' %}
|
2024-02-11 10:42:52 -05:00
|
|
|
{% if proxy == 'cacher' %}
|
2024-02-08 18:28:27 -05: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' ]
|
|
|
|
- backup: False
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
/etc/apt/sources.list:
|
|
|
|
file.replace:
|
|
|
|
- name: /etc/apt/sources.list
|
|
|
|
- pattern: 'https:'
|
|
|
|
- repl: 'http://HTTPS/'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
- backup: False
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2024-02-11 10:42:52 -05:00
|
|
|
requirements_installed:
|
2024-02-08 18:28:27 -05:00
|
|
|
pkg.installed:
|
2024-02-11 10:42:52 -05:00
|
|
|
- refresh: True
|
2024-02-08 18:28:27 -05:00
|
|
|
- pkgs:
|
|
|
|
- qubes-core-agent-networking
|
|
|
|
- qubes-core-agent-passwordless-root
|
|
|
|
- iproute2
|
|
|
|
- libnotify-bin
|
2024-02-11 10:42:52 -05:00
|
|
|
- lsb-release
|
|
|
|
|
|
|
|
echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/mullvad.list :
|
|
|
|
cmd.run
|
|
|
|
|
|
|
|
/usr/share/keyrings/mullvad-keyring.asc:
|
|
|
|
file.managed:
|
|
|
|
- source:
|
|
|
|
- salt://mullvad/mullvad-keyring.asc
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
{% if proxy == 'cacher' %}
|
|
|
|
/etc/apt/sources.list.d/mullvad.list:
|
|
|
|
file.replace:
|
|
|
|
- name: /etc/apt/sources.list.d/mullvad.list
|
|
|
|
- pattern: 'https:'
|
|
|
|
- repl: 'http://HTTPS/'
|
|
|
|
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
|
|
|
- backup: False
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
mullvad_installed:
|
|
|
|
pkg.installed:
|
|
|
|
- refresh: True
|
|
|
|
- pkgs:
|
2024-02-08 18:28:27 -05:00
|
|
|
- mullvad-vpn
|
|
|
|
|
|
|
|
{% endif %}
|
2024-02-11 10:42:52 -05:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|