when:
evaluating to false results in a status skipped on that task. Printing something on skipped comes from the standard out callback plugin. For default based callbacks, this can be disabled globally with the display_skipped_hosts
configuration item. See the docs: ansible-doc -t callback default
An elegant solution could be to wrap this thing in a real package manager, and install that. Several idempotent package manager modules exist for Ansible.
Or, the install script could be made safe to re-run, and returns with a zero code on success.
While I don't speak for the developers, they are cautious about adding features to core. And possibly they don't see a problem with a task reported as skipped, not every task of every play gets run.
when:
controls if a task runs. changed_when:
and failed_when:
modify the status of a task after it runs, such as based off return code or standard out. Together these give control over if a task is a status of changed or failed, even for generic command tasks.
For more control over idempotency, use a less generic module. And if you still are offended by what is printed, consider a custom callback plugin.