fixed first_available_file and roles support
for copy and template action