nit: clearer to me to set 

extra_var_arg="-e@${extra_vars_file}" 

outside the conditional and append the additional arg if the condition is met.