community.general.vertica_user module – Adds or removes Vertica database users and assigns 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 user and, optionally, assigns roles.
A user will not be removed until all the dependencies have been dropped.
In such a situation, if the module tries to remove the user it will fail and only remove roles granted to the user.
The below requirements are needed on the host that executes this module.
Name of the Vertica cluster.
Name of the Vertica database.
Sets the user’s password expiration.
Set to true if users are authenticated via LDAP.
The user will be created with password expired and set to $ldap$.
The password used to authenticate with.
The username used to authenticate with.
The user’s password encrypted by the MD5 algorithm.
The password must be generated with the format
Vertica cluster port to connect to.
Sets the user’s profile.
Sets the user’s resource pool.
Comma separated list of roles to assign to the user.
Whether to create
Name of the user to add or remove.
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 user with password
community.general.vertica_user: name=user_name password=md5<encrypted_password> db=db_name state=present
- name: Creating a new vertica user authenticated via ldap with roles assigned