Skip to content

"database" attribute of "postgresql_schema" being ignored? #194

@amossc

Description

@amossc
SUMMARY

The database attribute is being ignored by postresql.postgresql_schema

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.postgresql.postgresql_schema

ANSIBLE VERSION
2.10.17
COLLECTION VERSION
1.6.0
CONFIGURATION

OS / ENVIRONMENT

Ubuntu 20.04.3

STEPS TO REPRODUCE
- name: Create monitoring schema
  community.postgresql.postgresql_schema:
    name: "monitoring"
    owner: "monitoringuser"
    database: "monitoring"
    login_host: '{{ login_host }}'
    login_user: '{{ db_conn_user }}'
    login_password: '{{ db_conn_pass }}'
EXPECTED RESULTS

Schema monitoring created under the database monitoring

ACTUAL RESULTS

Schema monitoring is created under database postgres

[localhost] => {
     "changed": false,
     "invocation": {
         "module_args": {
             "ca_cert": null,
             "cascade_drop": false,
             "database": "postgres",
             "login_host": "host.name"
             "login_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
             "login_unix_socket": "",
             "login_user": "postgres",
             "name": "monitoring",
             "owner": "postgres",
             "port": 5432,
             "schema": "monitoring",
             "session_role": null,
             "ssl_mode": "prefer",
             "state": "present",
             "trust_input": true
         }
     },
     "queries": [],
     "schema": "monitoring"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions