Ansible configure and compile in directory
Ansible command module requires only one command and cannot be changed. You should use the shell module at the very least. Note however that this will break the idempotency of the playbook.

You should probably split the task up into three:


configure task using the shell module. Use creates: to tell the task to be skipped if the configure task has already created the expected output file
make task, using the Ansible Make module
similarly for the make install task.


This should yield the same actual result, but would be more likely to be idempotent.