Help please, the second day can not solve the problem. I need to add checksum sha1 in file that is created from a template Example: {{ item.some_var1 | hash('sha1') }} - work fine

But when I'm trying to get something like this {{ item.some_var1 'some_string' | hash('sha1') }} - not work {{ item.some_var1 item.some_var2 | hash('sha1') }} - not work

Documentation reading, but something I can not understand http://docs.ansible.com/ansible/playbooks_filters.html#set-theory-фильтерс Please, help!

1 Answer 1


Not sure what you want to achieve, but probably this would help:

{{ (item.some_var1 + 'some_string' + item.some_var2) | hash('sha1') }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.