ansible-collections / community.digitalocean

This Ansible collection contains modules for assisting in the automation of the DigitalOcean cloud.
https://galaxy.ansible.com/community/digitalocean/
GNU General Public License v3.0
141 stars 57 forks source link

community.digitalocean.digital_ocean_database module does not honor "project_name" #345

Open mohammed-infstones opened 10 months ago

mohammed-infstones commented 10 months ago
SUMMARY

When using the community.digitalocean.digital_ocean_database module, the project_name attribute does not work and it always deploys the database in the default project.

ISSUE TYPE
COMPONENT NAME

community.digitalocean.digital_ocean_database project_name

ANSIBLE VERSION

ansible [core 2.16.2]
  config file = None
  configured module search path = ['/xxxxx/xxxxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/9.1.0/libexec/lib/python3.12/site-packages/ansible
  ansible collection location = /xxxx/xxxxxxxx/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.12.1 (main, Dec  7 2023, 20:45:44) [Clang 15.0.0 (clang-1500.0.40.1)] (/opt/homebrew/Cellar/ansible/9.1.0/libexec/bin/python)
  jinja version = 3.1.3
  libyaml = True
COLLECTION VERSION
community.digitalocean        1.24.0
CONFIGURATION
CONFIG_FILE() = None
PAGER(env: PAGER) = less
OS / ENVIRONMENT

OSX 14.2

STEPS TO REPRODUCE
---
- name: Create a pg database and assign to Project
  community.digitalocean.digital_ocean_database:
    oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_KEY') }}"
    state: present
    name: "dev-pg"
    project_name: "test-project"
    engine: "pg"
    size: db-s-1vcpu-1gb
    region: nyc3
    num_nodes: 1
EXPECTED RESULTS

It should deploy the pg database in the respective project

ACTUAL RESULTS

Deploys the pg db in the default project.

mohammed-infstones commented 9 months ago

Just to be clear, it wont work with project_name but works with project