Reputation: 1233
I am looking for a way to lookup a secret stored in Amazon AWS secrets manager. I am following the the official documentation in this link.
The test playbook I used is:
- hosts: 127.0.0.1
connection: local
tasks:
- name: Lookup secret
debug:
msg: "{{ query('amazon.aws.aws_secret', 'my_secret', region='us-west-1') }} "
but I got the error:
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
Has anyone successfully looked up an amazon.aws.aws_secret in ansible?
Here is my ansible version:
$ 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)]
Upvotes: 0
Views: 2770
Reputation: 1233
The problem was encountered in ansible, but it turns out to be a generic Python and MacOS issue. The example in the question worked after setting:
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
per a post in this link.
Upvotes: 2