I've been trying to script the IdP installation with Ansible - at least the parts that can be easily automated.
When creating the Ansible task that invokes the IdP installer, I was aiming for non-interactive mode - -Didp.noprompt=true.
I soon found I also had to provide a merge file with idp.merge.properties - OK, I got that working with another Ansible task that creates this based on a template.
I've just looked at build.xml again and I see that for other replacable properies (like idp.scope), there is a separate ant task writescope that writes idp.scope to idp.merge.properties.
It looks like applying the same scheme to idp.entityID would simplify the non-interactive setup and would allow to go without having to prepare idp.merge.properties beforehand.
This would mean splitting the current getentityid task into separate askentityid / writeentityid tasks.
Just chipping it in as a suggestion to improve the non-interactive setup....