Hi Olivier,
setup-password is not meant to be scriptable or used as part of a deployment script. It basically wraps a number of calls to the _password API and you should do the same in your ansible playbook.
@TimV has written some useful instructions here on how to make use of the API and the bootstrap.password that might come in handy