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
This commit is contained in:
Monty Taylor 2020-03-20 07:26:42 -05:00
parent 0a98e2cf5f
commit 3205133c8a

View File

@ -6,7 +6,9 @@
- include_vars: "{{ repolist }}" - include_vars: "{{ repolist }}"
- name: Stop Gerrit - 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 - 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 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: tasks:
- name: Start gerrit - 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 - hosts: review
gather_facts: False gather_facts: False