community.clickhouse.clickhouse_role module – Creates or removes a ClickHouse role.
Note
This module is part of the community.clickhouse collection (version 2.0.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.clickhouse.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.clickhouse.clickhouse_role.
New in community.clickhouse 0.5.0
Synopsis
Creates or removes a ClickHouse role.
Requirements
The below requirements are needed on the host that executes this module.
clickhouse-driver
Parameters
Parameter |
Comments |
|---|---|
Any additional keyword arguments you want to pass to the Client interface when instantiating its object. Default: |
|
Run the command on all cluster hosts. If the cluster is not configured, the command will crash with an error. |
|
The same as the If not passed, relies on the driver’s default argument value. |
|
The same as the Default: |
|
The same as the If not passed, relies on the driver’s default argument value. |
|
The same as the If not passed, relies on the driver’s default argument value. |
|
The same as the If not passed, relies on the driver’s default argument value. Be sure your the user has permissions to read the system tables listed in the RETURN section. |
|
Role name to add or remove. |
|
Settings with their limitations that apply to the role. You can also specify the profile from which the settings will be inherited. |
|
Role state.
Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Supports check_mode. |
Notes
Note
See the clickhouse-driver documentation for more information about the driver interface.
Examples
- name: Create role
community.clickhouse.clickhouse_role:
name: test_role
state: present
- name: Create a role with settings
community.clickhouse.clickhouse_role:
name: test_role
state: present
settings:
- max_memory_usage = 15000 MIN 15000 MAX 16000 READONLY
- PROFILE restricted
cluster: test_cluster
- name: Remove role
community.clickhouse.clickhouse_role:
name: test_role
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Data-modifying executed statements. Returned: on success Sample: |