community.clickhouse.clickhouse_info module – Gather ClickHouse server information using the clickhouse-driver Client interface
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_info.
New in community.clickhouse 0.1.0
Synopsis
Gather ClickHouse server information using the clickhouse-driver Client interface.
Does not change server state.
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: |
|
Limits a set of return values you want to get. See the Return section for acceptable values. If not specified, returns all supported return values. |
|
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. |
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: Get server information
register: result
community.clickhouse.clickhouse_info:
login_host: localhost
login_user: alice
login_db: foo
login_password: my_password
- name: Print returned data
ansible.builtin.debug:
var: result
- name: Limit return values with users and roles
register: result
community.clickhouse.clickhouse_info:
limit:
- users
- roles
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The content of the system.clusters table with names as keys. Returned: success Sample: |
|
The content of the system.databases table with names as keys. Be sure your login_user has permissions. Returned: success Sample: |
|
The content of the system.dictionaries table with dictionary names as keys. Returned: success Sample: |
|
Python driver information. Returned: success Sample: |
|
The content of the system.grants table for users and roles as keys. Returned: success Sample: |
|
The content of the system.merge_tree_settings table with names as keys. Returned: success Sample: |
|
The content of the system.quotas table with quota names as keys. Returned: success Sample: |
|
The content of the system.roles table with names as keys. Be sure your login_user has permissions. Returned: success Sample: |
|
The content of the system.settings table with names as keys. Returned: success Sample: |
|
The content of the system.settings_profile_elements table for users, roles, profiles as keys. Returned: success Sample: |
|
The content of the system.settings_profiles table with profile names as keys. Returned: success Sample: |
|
The content of the system.storage_policies table with storage_policies names as keys. Returned: success Sample: |
|
The content of the system.tables table with the table names as keys. Returned: success Sample: |
|
The content of the system.users table with names as keys. Be sure your login_user has permissions. Returned: success Sample: |
|
Clickhouse server version. Returned: success Sample: |