Skip to content

ansible-collections/community.clickhouse

ClickHouse collection for Ansible

Plugins CI Codecov

Our mission

At the community.clickhouse Ansible collection project, our mission is to produce and maintain simple, flexible, and powerful open-source software tailored to automating ClickHouse-related tasks.

We welcome members from all skill levels to participate actively in our open, inclusive, and vibrant community. Whether you are an expert or just beginning your journey with Ansible and ClickHouse, you are encouraged to contribute, share insights, and collaborate with fellow enthusiasts.

We strive to make managing ClickHouse deployments as effortless and efficient as possible with automation, enabling users to focus on their core objectives.

External requirements

Using this collection

Installing the Collection from Ansible Galaxy

Before using the ClickHouse collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install community.clickhouse

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: community.clickhouse

Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically if you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install community.clickhouse --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax:

ansible-galaxy collection install community.clickhouse:==0.1.0

See Ansible Using collections for more details.

Usage example

- name: Create database
  community.clickhouse.clickhouse_db:
    name: test_db
    engine: Memory
    state: present
    comment: Test DB

- name: Get server information
  register: result
  community.clickhouse.clickhouse_info:

- name: Print server information
  ansible.builtin.debug:
    var: result

# Note: it runs SELECT version() just for the sake of example.
# You can get it with the task above much more conveniently.
- name: Query DB using non-default user & DB to connect to
  register: result
  community.clickhouse.clickhouse_client:
    execute: SELECT version()
    login_host: localhost
    login_user: alice
    login_db: foo
    login_password: my_password

- name: Print returned server version
  ansible.builtin.debug:
    var: result.result

Code of Conduct

We follow the Ansible Code of Conduct in all our interactions within this project.

If you encounter abusive behavior violating the Ansible Code of Conduct, please refer to the policy violations section of the Code of Conduct for information on how to raise a complaint.

Communication

GitHub Discussions feature is disabled in this repository. Use the clickhouse tag on the forum in the Project Discussions or Get Help category instead.

Asynchronous channels

Real-time channels

For more information about communication, including how to join these channels, see the Ansible communication guide.

We announce important development changes and releases through Ansible's The Bullhorn newsletter. If you are a collection developer, be sure you are subscribed.

We can create a Forum group and a Matrix channel in future if there's an interest.

For now, refer to general channels you can find in the Ansible communication guide.

Contributing to this collection

The content of this collection is made by people just like you: a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors and all types of contributions are very welcome.

You don't know how to start? Refer to our contribution guide!

We use the following guidelines:

Collection maintenance

The current maintainers (contributors with write or higher access) are listed in the MAINTAINERS file. If you have questions or need help, feel free to mention them in the proposals.

To learn how to maintain / become a maintainer of this collection, refer to the Maintainer guidelines.

It is necessary for maintainers of this collection to be subscribed to:

They also should be subscribed to Ansible's The Bullhorn newsletter.

Governance

The process of decision making in this collection is based on discussing and finding consensus among participants.

Releases Support Timeline

We maintain each major release version (1.x.y, 2.x.y, ...) for two years after the next major version is released.

Here is the table for the support timeline:

  • 1.x.y: to be released

Included content

See the list of included modules and their documentation for your installed version on the collection Galaxy page.

Tested with

Tested with the following ansible-core releases:

  • 2.14
  • 2.15
  • 2.16
  • 2.17
  • current development version

Tested with ClickHouse:

  • 21.8.15.7
  • 22.8.9.24
  • 23.8.9.54

More information