{% if recipe %}
{% set anamon_url = anamon|default('http://' + lab_controller.fqdn + '/beaker/anamon') %}
if command -v python3 >/dev/null ; then
   fetch /tmp/anamon {{ (anamon_url + '3')|shell_quoted }}
   python_command="python3"
elif [ -f /usr/libexec/platform-python ] && \
     /usr/libexec/platform-python --version 2>&1 | grep -q "Python 3" ; then
   fetch /tmp/anamon {{ (anamon_url + '3')|shell_quoted }}
   python_command="/usr/libexec/platform-python"
else
   fetch /tmp/anamon {{ anamon_url |shell_quoted }}
   python_command="python"
fi
$python_command /tmp/anamon --recipe-id {{ recipe.id }} --xmlrpc-url 'http://{{ lab_controller.fqdn }}:8000/RPC2'
{% endif %}
