community / community.clickhouse / 0.4.0 / module / clickhouse_info Gather ClickHouse server information using the clickhouse-driver Client interface | "added in version" 0.1.0 of community.clickhouse" Authors: Andrew Klychkov (@Andersson007), Aleksandr Vagachev (@aleksvagachev)community.clickhouse.clickhouse_info (0.4.0) — module
Install with ansible-galaxy collection install community.clickhouse:==0.4.0
collections: - name: community.clickhouse version: 0.4.0
Gather ClickHouse server information using the L(clickhouse-driver,https://clickhouse-driver.readthedocs.io/en/latest) Client interface.
Does not change server state.
- 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
limit: description: - 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. elements: str type: list version_added: 0.2.0 version_added_collection: community.clickhouse login_db: description: - The same as the C(Client(database='...')) argument. - If not passed, relies on the driver's default argument value. type: str login_host: default: localhost description: - The same as the C(Client(host='...')) argument. type: str login_port: description: - The same as the C(Client(port='...')) argument. - If not passed, relies on the driver's default argument value. type: int login_user: description: - The same as the C(Client(user='...')) argument. - 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. type: str client_kwargs: default: {} description: - Any additional keyword arguments you want to pass to the Client interface when instantiating its object. type: dict login_password: description: - The same as the C(Client(password='...')) argument. - If not passed, relies on the driver's default argument value. type: str
clusters: description: - The content of the system.clusters table with names as keys. returned: success sample: test_cluster_two_shards: '...' type: dict databases: description: - The content of the system.databases table with names as keys. - Be sure your I(login_user) has permissions. returned: success sample: system: '...' type: dict dictionaries: description: - The content of the system.dictionaries table with dictionary names as keys. returned: success sample: database: dictionary: '...' type: dict version_added: 0.3.0 version_added_collection: community.clickhouse driver: description: Python driver information. returned: success sample: version: 0.2.6 type: dict functions: description: - The content of the system.functions table with function names as keys. - Works only for clickhouse-server versions >= 22. - Does not output functions on the 'System' origin. returned: success sample: test_function: '...' type: dict version_added: 0.4.0 version_added_collection: community.clickhouse merge_tree_settings: description: - The content of the system.merge_tree_settings table with names as keys. returned: success sample: merge_max_block_size: '...' type: dict version_added: 0.3.0 version_added_collection: community.clickhouse quotas: description: - The content of the system.quotas table with quota names as keys. returned: success sample: default: '...' type: dict version_added: 0.4.0 version_added_collection: community.clickhouse roles: description: - The content of the system.roles table with names as keys. - Be sure your I(login_user) has permissions. returned: success sample: accountant: '...' type: dict settings: description: - The content of the system.settings table with names as keys. returned: success sample: zstd_window_log_max: '...' type: dict settings_profiles: description: - The content of the system.settings_profiles table with profile names as keys. returned: success sample: readonly: '...' type: dict version_added: 0.4.0 version_added_collection: community.clickhouse storage_policies: description: - The content of the system.storage_policies table with storage_policies names as keys. returned: success sample: storage_policies: '...' type: dict version_added: 0.4.0 version_added_collection: community.clickhouse tables: description: - The content of the system.tables table with the table names as keys. returned: success sample: system: settings: '...' type: dict version_added: 0.3.0 version_added_collection: community.clickhouse users: description: - The content of the system.users table with names as keys. - Be sure your I(login_user) has permissions. returned: success sample: default: '...' type: dict version: description: Clickhouse server version. returned: success sample: build: 59 feature: 12 maintenance: 2 raw: 23.12.2.59 type: null year: 23 type: dict