community.general.vertica_user (8.5.0) — module

Adds or removes Vertica database users and assigns 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 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.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Creating a new vertica user with password
  community.general.vertica_user: name=user_name password=md5<encrypted_password> db=db_name state=present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Creating a new vertica user authenticated via ldap with roles assigned
  community.general.vertica_user:
    name=user_name
    ldap=true
    db=db_name
    roles=schema_name_ro
    state=present

Inputs

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

ldap:
    description:
    - Set to true if users are authenticated via LDAP.
    - The user will be created with password expired and set to V($ldap$).
    type: bool

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

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

roles:
    aliases:
    - role
    description:
    - Comma separated list of roles to assign to the user.
    type: str

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

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

expired:
    description:
    - Sets the user's password expiration.
    type: bool

profile:
    description:
    - Sets the user's profile.
    type: str

password:
    description:
    - The user's password encrypted by the MD5 algorithm.
    - The password must be generated with the format C("md5" + md5[password + username]),
      resulting in a total of 35 characters. An easy way to do this is by querying the
      Vertica database with select V('md5'||md5('<user_password><user_name>'\)).
    type: str

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

resource_pool:
    description:
    - Sets the user's resource pool.
    type: str

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