Extra character (carriage return?) when decoding base64-encoded string?

Dear all,

I am not an expert on base64, but I guess this might be similar to
this issue:
<https://github.com/ansible/ansible/issues/5262&gt;

I have a variable myvariable that contains a base64-encoded string
generated by this command:

cat binary_file | base64

I then use the copy-module to create the binary file:

copy: content="{{ myvariable | b64decode }}" ...

I then get a different file than what I had before, and it seems it is
just one character that is added.

I also tried to add "...|trim" to content=..., but to no avail.

Any hints?

Johannes

https://github.com/ansible/ansible/issues/20150

Johannes