Closed abh23 closed 1 year ago
what error are you getting? there is a lack of information needed to figure out what is happening here. is it not getting set? are you running the cmd.run
in a jinja loop? etc. more info about what is happening is needed.
Almost certainly you need to fix the indentation of the jinja substitution. Using a template rather than contents
would make it easier if you want the df:
at the beginning.
@abh23 Making sure you saw the comments above.
Oh I certainly did. We can close this. Thanks for the help.
Description Trying to set output of
salt['cmd.run']('df -hl')
to a variable like:{%- set df_check = salt['cmd.run']('df -hl') -%}
Steps to Reproduce the behavior
{%- set df_check = salt['cmd.run']('df -hl') -%}
Expected behavior The variable should get written into the file.
Versions Report