This is in reference to issue 1137 in freeipa/ansible-freeipa.
freeipa/ansible-freeipa/roles/ipaclient/module_utils/ansible_ipa_client.py sets the options.unattended value to True here.
options.unattended
But when ansible-freeipa/roles/ipaclient/library/ipaclient_setup_nss.py makes the call tasks.modify_nsswitch_pam_stack(**the_options) which calls def modify_nsswitch_pam_stack() in freeipa/ipaplatform/debian/tasks.py, the ipautil.run command in that function does not pass the "unattended"/non-interactive state of the session to the Debian OS utilities such as pam-auth-update.
pam-auth-update
This results in situations where ansible-freeipa will hang waiting for an interactive prompt to be confirmed even though it has set the options to be unattended.
When the options.unattended flag is set, calls to pam-auth-update (or any Debian system functions) through ipautil.run will call "whiptail" and prompt for some confirmation because PAM files were locally modified.
ipautil.run
Any instances in which ipautil.run is called on a Debian system, include the environment variable "DEBIAN_FRONTEND=noninteractive" to be set so that native operating system functions and modules that are subsequently called will understand to run in a non-interactive mode.
Please refer to for details: https://github.com/freeipa/ansible-freeipa/issues/1137
Thanks for the report. tasks.modify_nsswitch_pam_stack() does not accept an option to indicate unattended runs. It means we need to modify all platform code to be able to pass it and also modify ipa-client-install part as well, it is broken not only for ansible-freeipa.
tasks.modify_nsswitch_pam_stack()
ipa-client-install