Update host_vars and sync-to-review-test playbook
The host is review-test.opendev.org, so hostvars for review-test.openstack.org are not so much going to do anything. It's easier if we just ssh as root from review to gerrit2 on review-test. review-test needs to be in letsencrypt group and have a handler. We need to install mysql - it's on the existing review servers but not in ansible, it's just left over from puppet. The db credentials are in /root/.gerrit_db.cnf Change-Id: I90e3c9d1b398cc16fea9f7056cfb059c7140160e
This commit is contained in:
parent
5f2e6c43a8
commit
4aa28fee13
@ -86,6 +86,7 @@ groups:
|
||||
- nb[0-9]*.opendev.org
|
||||
- review-dev[0-9]*.open*.org
|
||||
- review[0-9]*.open*.org
|
||||
- review-test.opendev.org
|
||||
- static[0-9]*.opendev.org
|
||||
- zuul[0-9]*.open*.org
|
||||
logstash:
|
||||
|
@ -245,11 +245,12 @@
|
||||
name: '[{{ gerrit_vhost_name }}]:29418'
|
||||
when: gerrit_self_hostkey is defined
|
||||
|
||||
- name: Install apache2
|
||||
- name: Install apache2 and mysql client tools
|
||||
apt:
|
||||
name:
|
||||
- apache2
|
||||
- apache2-utils
|
||||
- mysql-client-core-5.7
|
||||
state: present
|
||||
|
||||
- name: Apache modules
|
||||
|
@ -144,6 +144,11 @@
|
||||
- name: letsencrypt updated review01-opendev-org-main
|
||||
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
|
||||
|
||||
# review-test
|
||||
|
||||
- name: letsencrypt updated review-test-opendev-org-main
|
||||
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
|
||||
|
||||
# Mirrors
|
||||
|
||||
- name: letsencrypt updated mirror01-dfw-rax-main
|
||||
|
@ -11,22 +11,20 @@
|
||||
|
||||
- name: Copy the mysqldump
|
||||
shell:
|
||||
cmd: scp mysql_backups/gerrit.sql.gz.1 review-test.opendev.org:/home/gerrit2/gerrit.sql.gz
|
||||
cmd: scp mysql_backups/gerrit.sql.gz.1 gerrit2@review-test.opendev.org:/home/gerrit2/gerrit.sql.gz
|
||||
chdir: /home/gerrit2
|
||||
become: gerrit2
|
||||
|
||||
- name: Sync the git repos
|
||||
shell:
|
||||
cmd: rsync -avz --delete index cache git review-test.opendev.org:/home/gerrit2/review_site
|
||||
cmd: rsync -avz --delete index cache git gerrit2@review-test.opendev.org:/home/gerrit2/review_site
|
||||
chdir: /home/gerrit2/review_site
|
||||
become: gerrit2
|
||||
|
||||
- hosts: review-test.opendev.org
|
||||
tasks:
|
||||
|
||||
- name: Apply mysql dump
|
||||
shell:
|
||||
cmd: zcat /home/gerrit2/gerrit.sql.gz | mysql
|
||||
cmd: zcat /home/gerrit2/gerrit.sql.gz | mysql --defaults-file=/root/.gerrit_db.cnf
|
||||
|
||||
- name: Start gerrit
|
||||
shell:
|
||||
|
Loading…
Reference in New Issue
Block a user