Ansible sous macOS: initializeAfterForkError

En exécutant récemment un script ansible, depuis mon ordinateur de travail, un mac (pour disposer simplement d’une base Linux en entreprise), j’ai rencontré l’erreur suivante :

+[__NSPlaceholderDate 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.

Après quelques recherches, il suffit d’ajouter la variable d’environnement OBJC_DISABLE_INITIALIZE_FORK_SAFETY à la valeur YES et de relancer le script, pour que celui-ci se termine correctement.

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Source : StackOverflow