MacOS fait crasher un process descendant du fait qu'il n'est pas "sûr" en mémoire. Il faut donc passer outre cette sécurité.

L'erreur

Lorsque l'on passe un playbook qui va chercher des informations sur internet, ici, des clés publiques dans un repo l'erreur peut survenir.

TASK [Add Authorized keys] *************************************************************************************************************************************
objc[39687]: +[NSNumber initialize] may have been in progress in another thread when fork() was called.
objc[39687]: +[NSNumber initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
ERROR! A worker was found in a dead state

La solution

J'ajoute à mon environnement une clé/valeur pour que Python et l'OS ne fasse pas crash le processus.

set -x OBJC_DISABLE_INITIALIZE_FORK_SAFETY YES

C'est ici pour fish, à adapter suivant le shell utilisé.