try to fix forbidden jinja syntax 2

This commit is contained in:
LinuxSquare 2023-09-29 19:58:19 +02:00
parent 364f477f7d
commit 317f327b51

View file

@ -34,13 +34,13 @@ system_base_os-release:
- source: salt://{{ tpldir }}/files/base_os-release.jinja
- template: jinja
- context:
OS_VERSION: {{ OS_VERSION }}}
OS_VERSION: {{ OS_VERSION }}
- user: root
- group: root
- mode: '0644'
{% set NAME = salt['cmd.shell']('grep -E ^NAME /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') %}
{% set VERSION_ID = salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') %}
{% set OS_NAME = salt['cmd.shell']('grep -E ^NAME /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') %}
{% set OS_VERSION_ID = salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') %}
system_base_motd:
file.managed:
@ -48,8 +48,8 @@ system_base_motd:
- source: salt://{{ tpldir }}/files/base_motd.jinja
- template: jinja
- context:
OS: {{ NAME }}
OS_VERSION: {{ VERSION_ID }}
OS: {{ OS_NAME }}
OS_VERSION: {{ OS_VERSION_ID }}
- user: root
- group: root
- mode: '0644'