fix forbidden jinja syntax

This commit is contained in:
LinuxSquare 2023-09-29 19:50:52 +02:00
parent c8c08e774a
commit 364f477f7d

View file

@ -26,25 +26,30 @@ system_base_apps_dir:
- dir_mode: '0755'
- file_mode: '0644'
{% set OS_VERSION = salt['cmd.shell']('date "+%Y%m"') %}
system_base_os-release:
file.managed:
- name: /etc/os-release
- source: salt://{{ tpldir }}/files/base_os-release.jinja
- template: jinja
- context:
OS_VERSION: {{ salt['cmd.shell']('date "+%Y%m"') }}
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\'') %}
system_base_motd:
file.managed:
- name: /etc/motd
- source: salt://{{ tpldir }}/files/base_motd.jinja
- template: jinja
- context:
OS: {{ salt['cmd.shell']('grep -E ^NAME /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') }}
OS_VERSION: {{ salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') }}
OS: {{ NAME }}
OS_VERSION: {{ VERSION_ID }}
- user: root
- group: root
- mode: '0644'