I am using the template module for a bash script
There is a problem with these lines
cd $PGARCH
{% raw %}while mapfile -t -n 20 ARCHIVE_LOGS && ((${#ARCHIVE_LOGS[@]})){%
endraw %}
do
they should be like below
cd $PGARCH
while mapfile -t -n 20 ARCHIVE_LOGS && ((${#ARCHIVE_LOGS[@]}))
do
but factually the line break does not survive, hence the while loop, does not
work
cd $PGARCH
while mapfile -t -n 20 ARCHIVE_LOGS && ((${#ARCHIVE_LOGS[@]}))do
I tried the change the .j2 to
cd $PGARCH
{% raw %}while mapfile -t -n 20 ARCHIVE_LOGS && ((${#ARCHIVE_LOGS[@]})){%
endraw %}\n
do
this prevent the line breack from disappearing but the '\n' remains in the
target file on the remote
how would I approach this?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/147612204.8501.1675075567236%40office.mailbox.org.