Checklist
I have read intro post: https://community.passbolt.com/t/about-the-installation-issues-category/12
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue
Hello,
I am trying to use passbolt lookup plugin https://github.com/passbolt/passbolt-ansible-lookup-plugin
I have the following error :
exception during Jinja2 execution: Traceback (most recent call last):
File “/home/admin/.ansible/collections/ansible_collections/passbolt/passbolt_lookup/plugins/lookup/passbolt_lookup.py”, line 155, in run
resource = passbolt_api_client.get_resource(resource_uuid).to_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/admin/.ansible/collections/ansible_collections/passbolt/passbolt_lookup/plugins/module_utils/passbolt/passbolt_api_client.py”, line 100, in get_resource
resource_body = self._fetch_resource(id)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/admin/.ansible/collections/ansible_collections/passbolt/passbolt_lookup/plugins/module_utils/passbolt/passbolt_api_client.py”, line 234, in _fetch_resource
raise RuntimeError(
RuntimeError: Failed to fetch resource ‘…’. HTTP 403
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/ansible/template/init.py”, line 816, in _lookup
ran = instance.run(loop_terms, variables=self._available_variables, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/admin/.ansible/collections/ansible_collections/passbolt/passbolt_lookup/plugins/lookup/passbolt_lookup.py”, line 164, in run
raise AnsibleError(“Passbolt lookup failed: %s” % e)
ansible.errors.AnsibleError: Passbolt lookup failed: Failed to fetch resource ‘…’. HTTP 403
fatal: [AVMCVMA → localhost]: FAILED! => {
“msg”: “An unhandled exception occurred while running the lookup plugin ‘passbolt.passbolt_lookup.passbolt_lookup’. Error was a <class ‘ansible.errors.AnsibleError’>, original message: Passbolt lookup failed: Failed to fetch resource ‘…’. HTTP 403. Passbolt lookup failed: Failed to fetch resource ‘…’. HTTP 403”
}
Playbook task:
ansible.builtin.set_fact:
ansible_password: >-
{{ lookup('passbolt.passbolt_lookup.passbolt_lookup', '{{ passbolt_uuid }}', skip_ssl_verification=true) }}
delegate_to: localhost
Any idea where I should look at to troubleshoot this ?