Closed kennedyjosh closed 1 year ago
Files identified in the description:
plugins/lookup/aws_account_attribute.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/lookup/aws_account_attribute.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
Just after posting this I had a thought and tried calling the ansible-playbook
command directly from within the virtual env, skipping over python and cli script. The error still occurs.
!component=plugins/lookup/aws_secret.py
Files identified in the description:
plugins/lookup/aws_secret.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/lookup/aws_secret.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
@kennedyjosh This is likely the same problem discussed in https://github.com/ansible/ansible/issues/76322. You can try setting OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
as suggested in that discussion.
This is likely the same problem discussed in https://github.com/ansible/ansible/issues/76322. You can try setting OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES as suggested in that discussion.
I noticed that issue when researching the problem. Unfortunately, that fix doesn't seem to work for me.
I was just able to solve the issue by deleting and re-installing the virtual environment. I'm still not sure what the underlying cause was.
Closing this as it doesn't seem to be a problem with ansible
Summary
I have a system that will run ansible playbooks from a command-line script. This command line script runs in Python using argparse and will call an ansible playbook using the
subprocess
package. The problem is, this python script runs in a virtual environment, and that is somehow causingamazon.aws
'slookup
plugin to crash when I try to fetch a secret from secrets manager.Below I include instructions to reproduce the issue in a minimal way. If you run the python script without the virtual environment, it works fine.
Issue Type
Bug Report
Component Name
lookup/aws_secret.py
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
macOS 12.5
From virtual environment:
Steps to Reproduce
h
h.py
h.yml
On the command line:
Expected Results
I expect
my-secret
to be printed out as a debug msg from ansible.Actual Results
Before running this, I modified
h.py
to call ansible-playbook with-vvvvvv
This also triggered my OS to detect a crash in Python. Some info from the crash report (I can paste more info from the Apple crash report if needed, but I thought this encompassed anything relevant):
Code of Conduct