Skip to content

Commit a9f6103

Browse files
elabproEugene Arbatsky
andauthored
+dstool install with update executables (#81)
+condition for dynconf Co-authored-by: Eugene Arbatsky <elabpro@yandex-team.ru>
1 parent 0d8b4e9 commit a9f6103

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

playbooks/update_executable.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,36 @@
3131
- dynamic
3232
- no_restart
3333

34+
- hosts: "{{ ansible_play_hosts | default('ydb') }}"
35+
become: true
36+
tasks:
37+
- name: Check ydb-dstool presence
38+
stat:
39+
path: "{{ ydb_dir }}/bin/ydb-dstool"
40+
register: ydb_dstool_exists
41+
tags:
42+
- no_restart
43+
44+
- name: install ydb-dstool (from ydb_dstool_binary)
45+
ansible.builtin.copy:
46+
src: "{{ ydb_dstool_binary }}"
47+
dest: "{{ ydb_dir }}/bin/ydb-dstool"
48+
mode: 0755
49+
when: not ydb_dstool_exists.stat.exists and ydb_dstool_binary is defined
50+
tags:
51+
- no_restart
52+
53+
- name: install ydb-dstool (from URL)
54+
ansible.builtin.get_url:
55+
url: https://storage.yandexcloud.net/blinkov-tmp/ydb-dstool # TODO: replace with a release URL
56+
dest: "{{ ydb_dir }}/bin/"
57+
mode: 0755
58+
when: not ydb_dstool_exists.stat.exists and ydb_dstool_binary is not defined
59+
tags:
60+
- no_restart
61+
3462
- name: Restart YDB cluster
3563
become: true
36-
ansible.builtin.import_playbook: restart.yaml
64+
ansible.builtin.import_playbook: restart.yaml
65+
tags:
66+
- restart

roles/preflight/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
- name: Check conditions in variables (1. dynamic config)
4242
ansible.builtin.fail:
4343
msg: "Impossible to use ydb_enforce_user_token_requirement and ydb_request_client_certificate together"
44-
when: ydb_enforce_user_token_requirement|bool and ydb_request_client_certificate|bool
44+
when: ydb_use_dynamic_config is defined and ydb_use_dynamic_config|bool and ydb_enforce_user_token_requirement|bool and ydb_request_client_certificate|bool

0 commit comments

Comments
 (0)