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() got multiple values for argument 'name' for Ansible versions < ansible-2.14 #2

Closed
gilesw opened this issue Jan 11, 2024 · 8 comments
Assignees

Comments

@gilesw
Copy link

gilesw commented Jan 11, 2024

Testing out doppler and I got this error. Shame as the software looks great. Could it be the old version of Ansible I'm using?

fatal: [xxxx]: FAILED! => {"msg": "An unhandled exception occurred while templating '{{ lookup('dcostakos.doppler.doppler_secrets', project='x', token='dp.st.dev.Dxxxx', config='dev', name='XXX') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Unexpected templating type error occurred on ({{ lookup('dcostakos.doppler.doppler_secrets', project='registry', token='dp.st.dev.DkjMxxxx', config='dev', name='XXX') }}): _lookup() got multiple values for argument 'name'"}
ansible 2.9.9
  python version = 3.8.10 (default, Mar 31 2023, 12:16:43) [Clang 12.0.0 (clang-1200.0.32.29)]
@gilesw
Copy link
Author

gilesw commented Jan 11, 2024

pip list | grep requests
requests                                        2.31.0
requestsexceptions                              1.4.0

@gilesw
Copy link
Author

gilesw commented Jan 11, 2024

I've hit this with another lookup module, I assume that name is a reserved word somehow in older ansible versions

@dcostakos
Copy link
Owner

dcostakos commented Jan 11, 2024

Giles! Thanks for opening this issue! I'm honestly just excited that anyone is using this collection and I'm happy to help on it.

What is the output of "ansible --version" in your system?

And, please note this issue in upstream Ansible which is likely related to yours: ansible/ansible#79838

@gilesw
Copy link
Author

gilesw commented Jan 11, 2024

ansible 2.9.9, ah cool nice one for finding it

@dcostakos
Copy link
Owner

dcostakos commented Jan 16, 2024

Sorry Giles, I got sick! But I'm back and starting to test. Just as an FYI, Ansible 2.9 is definitely not being developed any longer. You didn't share which version of python you're using, so I hope it's not python 2.7 or something. I grabbed the oldest active verison 3 python I could for my testing. Does this environment look acceptable to you?

:~/ansible/old_python] $ ansible --version
ansible 2.9.9
  config file = None
  configured module search path = ['/Users/dcostakos/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/dcostakos/.pyenv/versions/3.8.18/lib/python3.8/site-packages/ansible
  executable location = /Users/dcostakos/.pyenv/versions/3.8.18/bin/ansible
  python version = 3.8.18 (default, Jan 16 2024, 08:21:07) [Clang 15.0.0 (clang-1500.1.0.2.5)]

@dcostakos
Copy link
Owner

Well I'm assuming my environment has is okay. I've completed some testing and will release a 1.0.2 version of this for testing today.

@dcostakos dcostakos changed the title _lookup() got multiple values for argument 'name' _lookup() got multiple values for argument 'name' for Ansible versions < ansible-2.14 Jan 19, 2024
@dcostakos dcostakos self-assigned this Jan 19, 2024
@dcostakos
Copy link
Owner

Giles, I hope this is fixed with the stable-1.0.2 branch. If you get some time, try to do this to try out the new version:

ansible-galaxy collection install git+https://github.com/dcostakos/doppler.git,stable-1.0.2

Let me know how it goes and if it works I'll post the fix to galaxy.

Now, I should note that really the oldest version of Ansible upstream is supporting is 2.14 and if you were to upgrade to that version (or newer) this problem would not occur. Happy to fix it tough because I'm jus tglad someone is using this.

@dcostakos
Copy link
Owner

I haven't heard from you, so I plan to close this as fixed with teh above note. I will not publish this new content to galaxy however. If you'd like me to consider that, open a new issue. Cheers and thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants