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

Listing resource failed with exception: CertificateSummary object has no attribute certificate_name #269

Open
ekryukov opened this issue Feb 15, 2024 · 4 comments

Comments

@ekryukov
Copy link

Issue Report

Error in oracle.oci.oci_certificates_management_certificate_facts

- name: Check if certificate exists
  become_user: "{{ wl_user }}"
  oracle.oci.oci_certificates_management_certificate_facts:
    name: "{{ cert_common_name }}"
    compartment_id: "{{ compartment_id }}"
    region: "{{ oci_region }}"
  register: cert_facts
The full traceback is:
  File "/tmp/ansible_oracle.oci.oci_certificates_management_certificate_facts_payload_lfus3aiu/ansible_oracle.oci.oci_certificates_management_certificate_facts_payload.zip/ansible_collections/oracle/oci/plugins/module_utils/oci_resource_utils.py", line 208, in list
    resources = self.list_resources()
  File "/tmp/ansible_oracle.oci.oci_certificates_management_certificate_facts_payload_lfus3aiu/ansible_oracle.oci.oci_certificates_management_certificate_facts_payload.zip/ansible_collections/oracle/oci/plugins/module_utils/oci_loadbalancer_custom_helpers.py", line 78, in list_resources
    for certificate in certificates
  File "/tmp/ansible_oracle.oci.oci_certificates_management_certificate_facts_payload_lfus3aiu/ansible_oracle.oci.oci_certificates_management_certificate_facts_payload.zip/ansible_collections/oracle/oci/plugins/module_utils/oci_loadbalancer_custom_helpers.py", line 79, in <listcomp>
    if certificate.certificate_name == self.module.params.get("name")
...
  msg: 'Listing resource failed with exception: ''CertificateSummary'' object has no attribute ''certificate_name'''

Expected behavior

The list of certificates found

Environment

  • OS version: Ansible host Mac OS X Sonoma 14.2.1, dest host: Oracle Linux 7.9

  • Ansible version:

ansible [core 2.14.3]
  config file = /Users/ekryukov/work/ansible/ansible.cfg
  configured module search path = ['/Users/ekryukov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/ekryukov/work/ansible/venv/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/ekryukov/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/ekryukov/work/ansible/venv/bin/ansible
  python version = 3.9.18 (main, Aug 24 2023, 18:16:58) [Clang 15.0.0 (clang-1500.1.0.2.5)] (/Users/ekryukov/work/ansible/venv/bin/python)
  jinja version = 3.1.2
  libyaml = True

  • OCI Python SDK version: 2.121.1

  • OCI Ansible Modules version:

Collection           Version
-------------------- -------
oracle.oci           4.40.0 
@phamp890
Copy link

I got same error. A bug?

@phamp890
Copy link

Thanks @vincerh

@dineshsuthar786
Copy link
Member

@ekryukov @phamp890 We have fixed this issue in latest release v4.43.0. Kindly test and let us know if you still face the issue.

@phamp890
Copy link

I confirm after upgrading oracle.oci to v4.43.0 it worked.
Thanks a lot.

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

3 participants