ansible.builtin.vertica_schema (v2.9.27) — module

Adds or removes Vertica database schema and roles.

| "added in version" 2.0 of ansible.builtin"

Authors: Dariusz Owczarek (@dareko)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

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
  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
  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
  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.

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

port:
    default: 5433
    description:
    - Vertica cluster port to connect to.

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

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

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

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

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

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

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