環境
- macOS Catalina バージョン 10.15.2
ansible: 2.9.2
config file = None
configured module search path = ['/Users/aoshima/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/aoshima/.local/share/virtualenvs/tests-jeV_LJ4f/lib/python3.7/site-packages/ansible
executable location = /Users/aoshima/.local/share/virtualenvs/tests-jeV_LJ4f/bin/ansible
python version = 3.7.6 (default, Dec 30 2019, 19:38:26) [Clang 11.0.0 (clang-1100.0.33.16)]
エラー内容
Ansibleからwin_ping
でwindows serverへの接続確認を行なおうとしたらエラーがでた。
$ ansible windows -i ./inventory -m win_ping
objc[47572]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[47572]: +[__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.
objc[47571]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[47571]: +[__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.
ERROR! A worker was found in a dead state
回避策
https://github.com/ansible/ansible/issues/34056#issuecomment-352862252 でワークアラウンドを説明してくれていた。macOSのpythonの問題らしいが、すぐには理解できそうになかったので放置...
$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
これで接続できるようになった。