put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
<%- if @kernel == 'Linux' -%>
#!/bin/bash
<%- else -%>
#!/bin/sh
<%- end -%>
#
# A wrapper for Xtrabackup
#
<% if @prescript -%>
<%- [@prescript].flatten.compact.each do |script| %>
<%= script %>
<%- end -%>
<% end -%>
innobackupex "$@"
<% if @postscript -%>
<%- [@postscript].flatten.compact.each do |script| %>
<%= script %>
<%- end -%>
<% end -%>