Debian Codegraph @

ansible_collections/community/clickhouse/README.md

raw
1 # ClickHouse collection for Ansible
2
3 [![Plugins CI](https://github.com/ansible-collections/community.clickhouse/workflows/Plugins%20CI/badge.svg)](https://github.com/ansible-collections/community.clickhouse/actions?query=workflow%3A"Plugins+CI") [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.clickhouse)](https://codecov.io/gh/ansible-collections/community.clickhouse)
4
5 ## Our mission
6
7 At the `community.clickhouse` Ansible collection project,
8 our mission is to produce and maintain simple, flexible,
9 and powerful open-source software tailored to automating ClickHouse-related tasks.
10
11 We welcome members from all skill levels to participate actively in our open, inclusive, and vibrant community.
12 Whether you are an expert or just beginning your journey with Ansible and ClickHouse,
13 you are encouraged to contribute, share insights, and collaborate with fellow enthusiasts.
14
15 We strive to make managing ClickHouse deployments as effortless and efficient as possible with automation,
16 enabling users to focus on their core objectives.
17
18 ## Included content
19
20 See the list of included modules and their documentation for your installed version on the [collection Galaxy page](https://galaxy.ansible.com/ui/repo/published/community/clickhouse/docs/).
21
22 ## External requirements
23
24 - [clickhouse-driver](https://clickhouse-driver.readthedocs.io/en/latest/) Python connector installed on a target machine.
25
26 ## Using this collection
27
28 ### Installing the Collection from Ansible Galaxy
29
30 Before using the ClickHouse collection, you need to install it with the Ansible Galaxy CLI:
31
32 ```bash
33 ansible-galaxy collection install community.clickhouse
34 ```
35
36 You can also include it in a `requirements.yml` file and install it via `ansible-galaxy collection install -r requirements.yml`, using the format:
37
38 ```yaml
39 ---
40 collections:
41 - name: community.clickhouse
42 ```
43
44 Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically if you upgrade the Ansible package.
45 To upgrade the collection to the latest available version, run the following command:
46
47 ```bash
48 ansible-galaxy collection install community.clickhouse --upgrade
49 ```
50
51 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:
52
53 ```bash
54 ansible-galaxy collection install community.clickhouse:==0.6.0
55 ```
56
57 See [Ansible Using collections](https://docs.ansible.com/projects/ansible/latest/user_guide/collections_using.html) for more details.
58
59 ### Usage example
60
61 ```yaml
62 - name: Create database
63 community.clickhouse.clickhouse_db:
64 name: test_db
65 engine: Memory
66 state: present
67 comment: Test DB
68
69 - name: Get server information
70 register: result
71 community.clickhouse.clickhouse_info:
72
73 - name: Print server information
74 ansible.builtin.debug:
75 var: result
76
77 - name: Query DB using non-default user & DB to connect to
78 register: result
79 community.clickhouse.clickhouse_client:
80 execute: SELECT * FROM my_table
81 login_host: localhost
82 login_user: alice
83 login_db: foo
84 login_password: my_password
85
86 - name: Print returned server version
87 ansible.builtin.debug:
88 var: result.result
89 ```
90
91 ## Code of Conduct
92
93 We follow the [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html) in all our interactions within this project.
94
95 If you encounter abusive behavior violating the [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html), please refer to the [policy violations](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html#policy-violations) section of the Code of Conduct for information on how to raise a complaint.
96
97 ## Communication
98
99 * Join the Ansible forum:
100 * [ClickHouse Team](https://forum.ansible.com/g/ClickHouseTeam): by joining the team you will automatically get subscribed to the posts tagged with [clickhouse](https://forum.ansible.com/tag/clickhouse).
101 * [Get Help](https://forum.ansible.com/c/help/6/none): get help or help others.
102 * [Posts tagged with 'clickhouse'](https://forum.ansible.com/tag/clickhouse): use tags to narrow the scope.
103 * [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts.
104 * [News & Announcements](https://forum.ansible.com/c/news/5/none): track project-wide announcements including social events.
105
106 * The Ansible [Bullhorn newsletter](https://forum.ansible.com/t/about-the-newsletter-category/166): used to announce releases and important changes.
107
108 For more information about communication see the [Ansible communication guide](https://docs.ansible.com/projects/ansible/devel/community/communication.html).
109
110 ## Contributing to this collection
111
112 The content of this collection is made by [people](https://github.com/ansible-collections/community.clickhouse/graphs/contributors) just like you: a community of individuals collaborating on making the world better through developing automation software.
113
114 We are actively accepting new contributors and all types of contributions are very welcome.
115
116 You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.clickhouse/blob/main/CONTRIBUTING.md)!
117
118 We use the following guidelines:
119
120 * [CONTRIBUTING.md](https://github.com/ansible-collections/community.clickhouse/blob/main/CONTRIBUTING.md)
121 * [Ansible Community Guide](https://docs.ansible.com/projects/ansible/latest/community/index.html)
122 * [Ansible Development Guide](https://docs.ansible.com/projects/ansible/devel/dev_guide/index.html)
123 * [Ansible Collection Development Guide](https://docs.ansible.com/projects/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections)
124
125 ## Collection maintenance
126
127 The current maintainers (contributors with `write` or higher access) are listed in the [MAINTAINERS](https://github.com/ansible-collections/community.clickhouse/blob/main/MAINTAINERS) file. If you have questions or need help, feel free to mention them in the proposals.
128
129 To learn how to maintain / become a maintainer of this collection, refer to the [Maintainer guidelines](https://github.com/ansible-collections/community.clickhouse/blob/main/MAINTAINING.md).
130
131 It is necessary for maintainers of this collection to be subscribed to:
132
133 * The collection itself (the `Watch` button -> `All Activity` in the upper right corner of the repository's homepage).
134 * The [news-for-maintainers repository](https://github.com/ansible-collections/news-for-maintainers).
135 * The [news-for-maintainers tag](https://forum.ansible.com/tag/news-for-maintainers) on the forum.
136 * The [clickhouse tag](https://forum.ansible.com/tag/clickhouse) on the forum (optional).
137
138 They also should be subscribed to Ansible's [The Bullhorn newsletter](https://docs.ansible.com/projects/ansible/devel/community/communication.html#the-bullhorn).
139
140 ## Governance
141
142 The process of decision making in this collection is based on discussing and finding consensus among participants.
143
144 ## Releases Support Timeline
145
146 We maintain each major release version (1.x.y, 2.x.y, ...) for two years after the next major version is released.
147
148 Here is the table for the support timeline:
149 - 1.x.y: to be released
150
151 ## Tested with
152
153 See our [CI matrix](https://github.com/ansible-collections/community.clickhouse/blob/main/.github/workflows/ansible-test-plugins.yml) for more information about ansible-core and ClickHouse versions the collection is tested with.
154
155 ## More information
156
157 - [Ansible User guide](https://docs.ansible.com/projects/ansible/latest/user_guide/index.html)
158 - [Ansible Developer guide](https://docs.ansible.com/projects/ansible/latest/dev_guide/index.html)
159 - [Ansible Community code of conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html)