问题描述
我正在寻找一种查找存储在Amazon AWS机密管理器中的机密的方法。我正在遵循this link中的官方文档。
我使用的测试剧本是:
- hosts: 127.0.0.1
connection: local
tasks:
- name: Lookup secret
debug:
msg: "{{ query('amazon.aws.aws_secret','my_secret',region='us-west-1') }} "
但是我得到了错误:
TASK [Lookup secret] **********************************************************************************************************************************************************************************************
objc[22931]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called.
objc[22931]: +[__NSPlaceholderDictionary 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
有没有人成功地在ansible中查找了amazon.aws.aws_secret?
这是我的烦人的版本:
$ ansible --version
ansible 2.10.2
...
python version = 3.8.6 (default,Oct 8 2020,14:07:53) [Clang 11.0.0 (clang-1100.0.33.17)]
解决方法
该问题在ansible中遇到,但事实证明这是一个通用的Python和MacOS问题。设置后,问题中的示例起作用:
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
每个this link中的帖子。