I'm refering to 
https://docs.ansible.com/ansible/latest/plugins/lookup/hashi_vault.html 
document. 
It requires hvac (python library). and i have already installed it. Im 
trying connect by github token.

On Thursday, May 21, 2020 at 12:00:05 AM UTC+5:30, vinoth kumar wrote:
>
>
> Have you installed pip hashi vault module . I think you have to install 
> the pip module for this connection. Check in hashi vault module page in 
> official ansible document . In first few line you can see the requirements. 
> Fix that it will work .
>
> On Wed 20. May 2020 at 12:02, Asmitha j.s <asmi...@gmail.com <javascript:>> 
> wrote:
>
>> I'm using hashi_vault to retrieve secrets from HashiCorp’s vault in 
>> ansible playbook.
>>
>>   - name: Return all secrets from a path
>>     set_fact:
>>        vault_result: "{{ lookup('hashi_vault', 'secret=secret/key:value 
>> token=token url=
>> https://vaultaddress/ui/vault/secrets/secret/list/folder/subfolder/environment/')}
>> }"
>>
>>
>>     tags:
>>        - vault
>>
>>  
>> command i'm using to run pl is ansible-playbook -v plybook.yml --tags 
>> vault 
>>
>> I'm getting following error:
>> fatal: [server_addr]: FAILED! => {
>>     "msg": "An unhandled exception occurred while running the lookup 
>> plugin 'hashi_vault'. Error was a <type 'exceptions.TypeError'>, original 
>> message: 'Response' object has no attribute '__getitem__'"
>> }
>>
>>
>> My python version is Python 2.7.5
>> My pip versin is pip 20.1 
>> My Ansible version is 
>>  ansible 2.9.3
>>   config file = /etc/ansible/ansible.cfg
>>   configured module search path = [u
>> '/home/asmithas/.ansible/plugins/modules', u
>> '/usr/share/ansible/plugins/modules']
>>   ansible python module location = /usr/lib/python2.7/site-packages/
>> ansible
>>   executable location = /usr/bin/ansible
>>   python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 
>> 20150623 (Red Hat 4.8.5-39)]
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ansible...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/a0a2b672-80ad-4066-8be4-7218788d2611%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/a0a2b672-80ad-4066-8be4-7218788d2611%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0081d5c3-fb51-43cc-b5e4-66b35bf7024c%40googlegroups.com.

Reply via email to