Block Whonix templates from repository rewriting.

Assumes that whonix templates all have nodename 'host'.
This commit is contained in:
unman 2022-08-22 10:25:54 +00:00
parent 0165e7610a
commit 9ea89964a4
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@
# #
# #
{% if grains['os_family']|lower == 'debian' %} {% if grains['os_family']|lower == 'debian' %}
{% if grains['nodename']|lower != 'host' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %} {% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl: {{ repo }}_baseurl:
file.replace: file.replace:
@ -21,6 +22,7 @@
- repl: 'http://HTTPS/' - repl: 'http://HTTPS/'
- flags: [ 'IGNORECASE', 'MULTILINE' ] - flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False - backup: False
{% endif %}
{% elif grains['os_family']|lower == 'arch' %} {% elif grains['os_family']|lower == 'arch' %}
pacman: pacman:

View File

@ -0,0 +1,4 @@
base:
I@qubes:type:template and not P@nodename:host and not P@nodename:whonix.*:
- match: compound
- cacher.change_templates