community.clickhouse.clickhouse_cfg_info module – Retrieves ClickHouse config file content and returns it as JSON
Note
This module is part of the community.clickhouse collection (version 2.1.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_cfg_info.
New in community.clickhouse 0.7.0
Synopsis
- Retrieves ClickHouse config file content and returns it as JSON.
- Supports config files in the YAML and XML formats.
- Does not change server state.
Requirements
The below requirements are needed on the host that executes this module.
- pyyaml (for YAML config files)
- xmltodict (for XML config files)
Parameters
Parameter | Comments |
|---|---|
path path / required | Path to the config file. |
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Supports check_mode. |
Examples
- name: Get server information
register: result
community.clickhouse.clickhouse_cfg_info:
path: /etc/clickhouse-server/config.yaml
- name: Print returned data
ansible.builtin.debug:
var: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
config dictionary | The content of the config file. Returned: success |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/clickhouse/clickhouse_cfg_info_module.html