The example uses of the community.general.credstash lookup are incorrect; it does not accept a parameter named context, but uses **kwarg.
- name: "Test credstash lookup plugin -- get the password with a context passed as a variable"
ansible.builtin.debug:
msg: "{{ lookup('community.general.credstash', 'some-password', context=context) }}"
should be:
- name: "Test credstash lookup plugin -- get the password with a context passed as a variable"
ansible.builtin.debug:
msg: "{{ lookup('community.general.credstash', 'some-password', **context) }}"
and
- name: "Test credstash lookup plugin -- get the password with a context defined here"
ansible.builtin.debug:
msg: "{{ lookup('community.general.credstash', 'some-password', context=dict(app='my_app', environment='production')) }}"
should be
- name: "Test credstash lookup plugin -- get the password with a context defined here"
ansible.builtin.debug:
msg: "{{ lookup('community.general.credstash', 'some-password', app='my_app', environment='production') }}"
Summary
The example uses of the community.general.credstash lookup are incorrect; it does not accept a parameter named context, but uses **kwarg.
should be:
and
should be
Issue Type
Bug Report
Component Name
community.general.credstash
Ansible Version
Community.general Version
Configuration
OS / Environment
Debian bullseye
Steps to Reproduce
Mostly, code review. But you'll need to set up credstash with a secret using an encryption context. Then a playbook as per the documentation.
Expected Results
Secret should be fetched.
Actual Results
Exception is thrown due to the invalid context variable.
Code of Conduct