community.clickhouse.clickhouse_settings_profile module – Creates, removes or modify a ClickHouse settings profile using the clickhouse-driver Client interface
Note
This module is part of the community.clickhouse collection (version 2.3.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_settings_profile.
New in community.clickhouse 2.3.0
Synopsis
Creates, remove or modify a ClickHouse settings profile using the clickhouse-driver Client interface.
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: |
|
The name of the cluster where the row policy is defined. If not provided, the row policy will be managed on the local server. |
|
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. |
|
The name of the row policy to manage. |
|
List of profiles assigned to an object. |
|
Settings assigned to an object. Settings are passed as dict where key is the setting name. Each setting takes the following options value, min, max, writability. |
|
Maximum allowed value for the setting. |
|
Minimum allowed value for the setting. |
|
The value for the setting. |
|
Whether the setting can be changed. Example values you can found profiles |
|
Whether the settings profile should be present or not. If If Choices:
|
|
List of server error codes that will be treated as success, otherwise throw errors. Default: |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Supports check_mode. |
|
Support: partial |
Module can’t determine what data type is certain setting. So when passing setting that will be resolved by server to another value module will be not idempotent. For example passing 1G as value server will store this as 100000000. |
Notes
Note
See the clickhouse-driver documentation for more information about the driver interface.
For possible settings, check session settings.
Examples
---
- name: Create plain settings profile
community.clickhouse.clickhouse_settings_profile:
name: test_profile
- name: Create settings profile with setting
community.clickhouse.clickhouse_settings_profile:
name: test_profile
settings:
max_threads:
value: 1
- name: Create settings profile with settings
community.clickhouse.clickhouse_settings_profile:
name: test_profile
settings:
max_threads:
value: 1
max_memory_usage:
value: 10000000000
- name: Create settings profile with profiles
community.clickhouse.clickhouse_settings_profile:
name: test_profile
profiles:
- web
- name: Create settings profile with settings and profiles
community.clickhouse.clickhouse_settings_profile:
name: test_profile
settings:
max_threads:
value: 1
max_memory_usage:
value: 10000000000
profiles:
- web
- name: Drop settings profile
community.clickhouse.clickhouse_settings_profile:
name: test_profile
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: |