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

OCI environment variables are not recognized #289

Open
devwebcl opened this issue Sep 4, 2024 · 0 comments
Open

OCI environment variables are not recognized #289

devwebcl opened this issue Sep 4, 2024 · 0 comments

Comments

@devwebcl
Copy link

devwebcl commented Sep 4, 2024

Issue Report

I am using Ansible collections with API authentication, so I have a ~/.oci/config file. However, when I try to set up environment variables such as OCI_USER_ID and OCI_REGION, they are not honored at runtime, and the values from the config file are always used instead.

A clear and concise description of what the issue is.

Expected behavior

new values set through environment variables

Environment

  • OS version:
    Linux

  • Ansible version:

    ansible 2.9.27
    config file = /etc/ansible/ansible.cfg
    configured module search path = ['/home/opc/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/lib/python3.6/site-packages/ansible
    executable location = /usr/bin/ansible
    python version = 3.6.8 (default, Nov 16 2023, 04:13:44) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20.0.1)]

  • OCI Python SDK version:

    2.133.0

  • OCI Ansible Modules version:

    5.0.0

Ansible playbook to reproduce the issue

export OCI_TENANCY=ocid1.tenancy.oc1..xxx
export OCI_USER_ID=ocid1.user.oc1..xxx
export OCI_USER_FINGERPRINT=xxx
export OCI_USER_KEY_FILE=/path...
export OCI_REGION=region...

this is a simple task just to check underneath the new values are recognized:

---
- name: Get a specific instance
  oracle.oci.oci_compute_instance_facts:
    # required
    instance_id: "ocid1.instance.oc1.REGION.XXXX"
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

1 participant