community.general.vertica_schema (8.5.0) — module

Adds or removes Vertica database schema and roles

Authors: Dariusz Owczarek (@dareko)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Adds or removes Vertica database schema and, optionally, roles with schema access privileges.

A schema will not be removed until all the objects have been dropped.

In such a situation, if the module tries to remove the schema it will fail and only remove roles created for the schema if they have no dependencies.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Creating a new vertica schema
  community.general.vertica_schema: name=schema_name db=db_name state=present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Creating a new schema with specific schema owner
  community.general.vertica_schema: name=schema_name owner=dbowner db=db_name state=present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Creating a new schema with roles
  community.general.vertica_schema:
    name=schema_name
    create_roles=schema_name_all
    usage_roles=schema_name_ro,schema_name_rw
    db=db_name
    state=present

Inputs

    
db:
    description:
    - Name of the Vertica database.
    type: str

port:
    default: '5433'
    description:
    - Vertica cluster port to connect to.
    type: str

owner:
    description:
    - Name of the user to set as owner of the schema.
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether to create V(present), or drop V(absent) a schema.
    type: str

schema:
    aliases:
    - name
    description:
    - Name of the schema to add or remove.
    required: true
    type: str

cluster:
    default: localhost
    description:
    - Name of the Vertica cluster.
    type: str

login_user:
    default: dbadmin
    description:
    - The username used to authenticate with.
    type: str

usage_roles:
    aliases:
    - usage_role
    description:
    - Comma separated list of roles to create and grant usage access to the schema.
    type: str

create_roles:
    aliases:
    - create_role
    description:
    - Comma separated list of roles to create and grant usage and create access to the
      schema.
    type: str

login_password:
    description:
    - The password used to authenticate with.
    type: str