Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support no-restart flag for clickhouse_user_files #33

Merged
merged 4 commits into from
Dec 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions tasks/pre_configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@
set_fact:
_user_configs: "{{
_user_configs | default([]) + ((item is mapping) | ternary(
[{'file': item.file, 'no_log': item.no_log | default(False)}],
[{'file': item, 'no_log': False}]
))
}}" # noqa: jinja[spacing]
[{'file': item.file, 'no_log': item.no_log | default(False), 'no_restart': item.no_restart | default(False)}],
[{'file': item, 'no_log': False, 'no_restart': False}]
)) }}" # noqa: jinja[spacing]
loop: "{{ common_user_configs + clickhouse_user_files | default([]) }}"
- name: Deploy clickhouse-server users overrides (requires restart)
template:
Expand All @@ -177,7 +176,16 @@
mode: "u=r,go="
notify: restart-clickhouse
no_log: "{{ item.no_log }}"
loop: "{{ _user_configs }}"
loop: "{{ _user_configs | selectattr('no_restart', 'eq', False) }}"
- name: Deploy clickhouse-server users overrides (without restart)
template:
src: "{{ (item is mapping) | ternary(item.file, item) }}.j2"
dest: "/etc/clickhouse-server/users.d/{{ (item is mapping) | ternary(item.file, item) | basename }}"
owner: clickhouse
group: clickhouse
mode: "u=r,go="
no_log: "{{ item.no_log }}"
loop: "{{ _user_configs | selectattr('no_restart', 'eq', True) }}"
- name: Deploy dictionaries configuration (requires restart)
template:
src: "{{ item }}.j2"
Expand Down
Loading