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 python sdk required for this module (SDK already installed) #267

Open
lucasaugustomcc opened this issue Jan 25, 2024 · 1 comment
Open

Comments

@lucasaugustomcc
Copy link

Issue Report

Describe the issue

Even though the SDK is already installed I'm still getting an error message.
I've followed the instructions from the Troubleshooting guide but it does not work for me.

Error message:

[I am not able to run a](fatal: [chat-52]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "oci python sdk required for this module.", "troubleshooting_tips": "Refer to troubleshooting guide https://docs.oracle.com/en-us/iaas/tools/oci-ansible-collection/latest/guides/troubleshooting-guide.html"})

Expected behavior

Identify oci python sdk already installed and run playbook.

Environment

  • OS version: Ubuntu 22.04

  • Ansible version: core 2.16.2

  ansible [core 2.16.2]
  config file = /home/lucas/.ansible.cfg
  configured module search path = ['/home/lucas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /home/lucas/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True
  • OCI Python SDK version: 2.119.1

  • OCI Ansible Modules version: 4.40.0

Ansible playbook to reproduce the issue

- name: Instances
  hosts: oracle
  strategy: free
  gather_facts: false
  collections:
    - oracle.oci
  tasks:    
  - name: Upgrade / downgrade compute instance
    oci_compute_instance:
      instance_id: "{{ instance_id }}"
      shape_config:
        memory_in_gbs: "{{ memory_in_gbs }}"
        ocpus: "{{ ocpus }}" 
        baseline_ocpu_utilization: BASELINE_1_1    
      wait_timeout: 3000
@valkiriaaquatica
Copy link

valkiriaaquatica commented Mar 26, 2024

hey @lucasaugustomcc some recommendations:

  1. try to simulate the issue with a virtual enviroment
  2. Add pythn interpreter path to vars in playbooks
vars:
    ansible_python_interpreter: /usr/bin/python3   

you can try with python3.10 that ansible --version shows is using (in case
you python 3 version is another parallel python version you have)

  1. Double check that python3 version has the oci installed: ``/usr/bin/python3 -m pip show oci and `/usr/bin/python3 -m install show oci ` # in case is not

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

2 participants