From 3205133c8ac1739d4f478d8b193c4b1cf4cf8165 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 20 Mar 2020 07:26:42 -0500 Subject: [PATCH] Update gerrit rename playbook for docker-compose Starting and stopping gerrit is now done by our new docker-compose overlord. Update the rename playbook to use it for stopping at the beginning, and then use the start tasks of the gerrit role to start it at the end. Change-Id: Ibd07f9269771dfa70fbefbba69b905f165e018af --- playbooks/rename_repos.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/playbooks/rename_repos.yaml b/playbooks/rename_repos.yaml index 0e328137d4..83c8e18cab 100644 --- a/playbooks/rename_repos.yaml +++ b/playbooks/rename_repos.yaml @@ -6,7 +6,9 @@ - include_vars: "{{ repolist }}" - name: Stop Gerrit - shell: invoke-rc.d gerrit stop + shell: + cmd: docker-compose down + chdir: /etc/gerrit-compose/ - name: Update account_project_watches in gerrit database shell: echo 'update account_project_watches set project_name = "{{ item.new }}" where project_name = "{{ item.old }}";' | mysql --defaults-file=/root/.gerrit_db.cnf reviewdb @@ -120,7 +122,12 @@ tasks: - name: Start gerrit - shell: invoke-rc.d gerrit start + include_role: + name: gerrit + vars: + gerrit_run_init: true + gerrit_run_compose_up: true + tasks_from: start - hosts: review gather_facts: False