You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use key_by when calling oci_database_database to key on db_name and db_home_id (i.e., we only want one database with a given name in a given home). Playbook snippet:
TASK [create] ***************************************************************************************************
[WARNING]: ['db_name'] attributes are not supported by module for key_by keyword
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Getting resource failed with exception: pop expected at most 1 argument, got 2", "troubleshooting_tips": "Refer to troubleshooting guide https://docs.oracle.com/en-us/iaas/tools/oci-ansible-collection/latest/guides/troubleshooting-guide.html"}
If I change key_by to:
key_by: [db_home_id]
Then I get:
TASK [create] ***************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Getting resource failed with exception: pop expected at most 1 argument, got 2", "troubleshooting_tips": "Refer to troubleshooting guide https://docs.oracle.com/en-us/iaas/tools/oci-ansible-collection/latest/guides/troubleshooting-guide.html"}
The text was updated successfully, but these errors were encountered:
Issue Report
Describe the issue
Trying to use key_by when calling oci_database_database to key on db_name and db_home_id (i.e., we only want one database with a given name in a given home). Playbook snippet:
Expected behavior
Playbook should run without error.
Environment
OS version:
[opc@odsa-management01 ~]$ cat /etc/oracle-release
Oracle Linux Server release 8.8
[opc@odsa-management01 ~]$ uname -a
Linux odsa-management01 5.15.0-106.131.4.el8uek.x86_64 remove readme_1.md #2 SMP Fri Sep 22 16:00:58 PDT 2023 x86_64 x86_64 x86_64 GNU/Linux
Ansible version:
[opc@odsa-management01 ~]$ ansible --version
ansible [core 2.15.3]
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.11/site-packages/ansible
ansible collection location = /home/opc/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.5 (main, Nov 15 2023, 18:13:17) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20.0.1)] (/usr/bin/python3.11)
jinja version = 3.1.2
libyaml = True
[opc@odsa-management01 ~]$ python -c "import oci;print(oci.version)"
2.93.1
[opc@odsa-management01 ~]$ ansible-galaxy collection list
/home/opc/.ansible/collections/ansible_collections
Collection Version
oracle.oci 4.42.0
Ansible playbook to reproduce the issue
See above. When running as above:
If I change key_by to:
Then I get:
The text was updated successfully, but these errors were encountered: