community / community.general / 1.3.11 / module / vertica_user Adds or removes Vertica database users and assigns roles. Authors: Dariusz Owczarek (@dareko)community.general.vertica_user (1.3.11) — module
Install with ansible-galaxy collection install community.general:==1.3.11
collections: - name: community.general version: 1.3.11
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.
- 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 community.general.vertica_user: name=user_name ldap=true db=db_name roles=schema_name_ro state=present
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 I($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 C(present), drop C(absent) or lock C(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 '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