Use caching pillar as condition for repo change

This commit is contained in:
unman 2023-02-21 12:57:17 +00:00
parent 78c54bd3e1
commit 9f1e8be5ef
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
11 changed files with 13 additions and 12 deletions

View File

@ -1,6 +1,6 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
{% for repo in salt['file.find']('/etc/yum.repos.d/', name='*repo*') %}
{{ repo }}_baseurl:

View File

@ -1,6 +1,7 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
/etc/apt/sources.list:
file.replace:

View File

@ -23,7 +23,7 @@
- mode: 644
- makedirs: True
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
{% if grains['os_family']|lower == 'debian' %}
{% if grains['nodename']|lower != 'host' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}

View File

@ -5,8 +5,7 @@
{% if grains['nodename'] != 'dom0' %}
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
/etc/apt/sources.list:
file.replace:

View File

@ -2,7 +2,7 @@
#
#
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
update_sources:
file.replace:
- names:

View File

@ -3,7 +3,7 @@
{% if grains['nodename'] != 'dom0' %}
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
/etc/apt/sources.list:
file.replace:

View File

@ -1,7 +1,7 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
#
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
/etc/apt/sources.list:
file.replace:

View File

@ -5,7 +5,7 @@
{% if grains['nodename'] != 'dom0' %}
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
{% if grains['os_family']|lower == 'debian' %}
{% if grains['nodename']|lower != 'host' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}

View File

@ -3,7 +3,7 @@
#
#
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
{% if grains['os_family']|lower == 'debian' %}
{% if grains['nodename']|lower != 'host' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}

View File

@ -1,6 +1,6 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
/etc/apt/sources.list:
file.replace:

View File

@ -20,7 +20,8 @@
- group: root
- makedirs: True
{% if salt['qvm.exists']('cacher') %}
{% if salt['pillar.get']('update_proxy:caching') %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl: