2020-06-15 15:08:34 +00:00
|
|
|
- hosts: review-test.opendev.org
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Stop gerrit
|
|
|
|
shell:
|
|
|
|
cmd: docker-compose down
|
|
|
|
chdir: /etc/gerrit-compose
|
|
|
|
|
|
|
|
- hosts: review01.openstack.org
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Copy the mysqldump
|
|
|
|
shell:
|
2020-06-19 14:31:28 +00:00
|
|
|
cmd: scp mysql_backups/gerrit.sql.gz.1 gerrit2@review-test.opendev.org:/home/gerrit2/gerrit.sql.gz
|
2020-06-15 15:08:34 +00:00
|
|
|
chdir: /home/gerrit2
|
|
|
|
|
|
|
|
- name: Sync the git repos
|
|
|
|
shell:
|
2020-06-19 14:31:28 +00:00
|
|
|
cmd: rsync -avz --delete index cache git gerrit2@review-test.opendev.org:/home/gerrit2/review_site
|
2020-06-15 15:08:34 +00:00
|
|
|
chdir: /home/gerrit2/review_site
|
|
|
|
|
|
|
|
- hosts: review-test.opendev.org
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Apply mysql dump
|
|
|
|
shell:
|
2020-06-19 14:31:28 +00:00
|
|
|
cmd: zcat /home/gerrit2/gerrit.sql.gz | mysql --defaults-file=/root/.gerrit_db.cnf
|
2020-06-15 15:08:34 +00:00
|
|
|
|
|
|
|
- name: Start gerrit
|
|
|
|
shell:
|
|
|
|
cmd: docker-compose up -d
|
|
|
|
chdir: /etc/gerrit-compose
|