Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup Plugins such as amazon.aws.aws_secret will only use the main interpreter #871

Closed
1 task done
ckdecember opened this issue Jun 9, 2022 · 3 comments
Closed
1 task done
Labels
docs lookup lookup plugin needs_triage plugins plugin (any type)

Comments

@ckdecember
Copy link

ckdecember commented Jun 9, 2022

Summary

Lookup Plugins such as amazon.aws.aws_secret will only use the main interpreter - ansible_python_interpreter CANNOT override this.

This is not made clear in the documentation.

I was using ansible that was using a python interpreter that did not have the correct python libraries installed. I used the ansible_python_interpreter to override this behavior to point to the correct set of libraries.

However, it appears that the lookup plugins will ONLY use the main interpreter. The override does nothing here.

Issue Type

Documentation Report

Component Name

plugins/lookup/aws_account_attribute.py
plugins/lookup/aws_secret.py
plugins/lookup/aws_ssm.py

Ansible Version

$ ansible --version

Collection Versions

$ ansible-galaxy collection list

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Additional Information

Some people might like to use virtual environments to install different python packages. They might believe they can use the ansible interpreter override to facilitate this desire. While this works for most of ansible, I was not aware it does not work for lookup plugins and ran into issues because of it.

At least building awareness of this gotcha can help engineers work around this.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot ansibullbot added lookup lookup plugin plugins plugin (any type) labels Jun 9, 2022
@jillr
Copy link
Collaborator

jillr commented Jun 28, 2022

Hi @ckdecember All lookup plugins in Ansible execute on the controller. https://docs.ansible.com/ansible/devel/plugins/lookup.html

I can see how that statement would be easy to miss in the docs though, you might want to file a documentation bug against the Ansible user guide in https://github.com/ansible/ansible.

@jillr jillr closed this as completed Jun 28, 2022
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
wafv2_web_acl_info doc fix

SUMMARY
  10:5      error    wrong indentation: expected 2 but found 4  (indentation)
  19:30     error    too few spaces after comma  (commas)
  23:1      error    wrong indentation: expected 2 but found 0  (indentation)

ISSUE TYPE


Docs Pull Request

COMPONENT NAME
wafv2_web_acl_info

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
wafv2_web_acl_info doc fix

SUMMARY
  10:5      error    wrong indentation: expected 2 but found 4  (indentation)
  19:30     error    too few spaces after comma  (commas)
  23:1      error    wrong indentation: expected 2 but found 0  (indentation)

ISSUE TYPE


Docs Pull Request

COMPONENT NAME
wafv2_web_acl_info

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <[email protected]>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
wafv2_web_acl_info doc fix

SUMMARY
  10:5      error    wrong indentation: expected 2 but found 4  (indentation)
  19:30     error    too few spaces after comma  (commas)
  23:1      error    wrong indentation: expected 2 but found 0  (indentation)

ISSUE TYPE


Docs Pull Request

COMPONENT NAME
wafv2_web_acl_info

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs lookup lookup plugin needs_triage plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

3 participants