community.general.vertica_schema module – Adds or removes Vertica database schema and roles
This module is part of the community.general collection (version 6.6.2).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install community.general.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify:
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.
The below requirements are needed on the host that executes this module.
Name of the Vertica cluster.
Comma separated list of roles to create and grant usage and create access to the schema.
Name of the Vertica database.
The password used to authenticate with.
The username used to authenticate with.
Name of the user to set as owner of the schema.
Vertica cluster port to connect to.
Name of the schema to add or remove.
Whether to create
Comma separated list of roles to create and grant usage access to the schema.
Can run in
Will return details on what has changed (or possibly needs changing in
The default authentication assumes that you are either logging in as or sudo’ing to the
dbadminaccount on the host.
This module uses
pyodbc, a Python ODBC database adapter. You must ensure that
pyodbcis installed on the host and properly configured.
unixODBCfor Vertica requires
Driver = /opt/vertica/lib64/libverticaodbc.soto be added to the
Verticasection of either
ErrorMessagesPath = /opt/vertica/lib64and
DriverManagerEncoding = UTF-16to be added to the
Driversection of either
- name: Creating a new vertica schema
community.general.vertica_schema: name=schema_name db=db_name state=present
- name: Creating a new schema with specific schema owner
community.general.vertica_schema: name=schema_name owner=dbowner db=db_name state=present
- name: Creating a new schema with roles