fix: cacher jinja fails to split words

Fixes: https://github.com/ben-grande/qusal/issues/35
This commit is contained in:
Ben Grande 2024-03-21 21:52:02 +01:00
parent 7faf944964
commit 4ac0ec9613
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56

View File

@ -4,12 +4,14 @@ SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.co
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% set wanted = salt['cmd.shell']('qvm-ls --no-spinner --raw-list') -%}
{% set wanted = salt['cmd.shell']('qvm-ls --no-spinner --raw-list --tags updatevm-sys-cacher') -%}
{% for tpl in wanted.replace(",", " ") -%}
{% if wanted -%}
{% for tpl in wanted.split("\n") %}
"{{ tpl }}-cacher-untag":
qvm.tags:
- name: {{ tpl }}
- del:
- updatevm-sys-cacher
{% endfor -%}
{% endif -%}