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
|
- nb[0-9]*.opendev.org
|
||||||
- review-dev[0-9]*.open*.org
|
- review-dev[0-9]*.open*.org
|
||||||
- review[0-9]*.open*.org
|
- review[0-9]*.open*.org
|
||||||
|
- review-test.opendev.org
|
||||||
- static[0-9]*.opendev.org
|
- static[0-9]*.opendev.org
|
||||||
- zuul[0-9]*.open*.org
|
- zuul[0-9]*.open*.org
|
||||||
logstash:
|
logstash:
|
||||||
|
@ -245,11 +245,12 @@
|
|||||||
name: '[{{ gerrit_vhost_name }}]:29418'
|
name: '[{{ gerrit_vhost_name }}]:29418'
|
||||||
when: gerrit_self_hostkey is defined
|
when: gerrit_self_hostkey is defined
|
||||||
|
|
||||||
- name: Install apache2
|
- name: Install apache2 and mysql client tools
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- apache2
|
- apache2
|
||||||
- apache2-utils
|
- apache2-utils
|
||||||
|
- mysql-client-core-5.7
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Apache modules
|
- name: Apache modules
|
||||||
|
@ -144,6 +144,11 @@
|
|||||||
- name: letsencrypt updated review01-opendev-org-main
|
- name: letsencrypt updated review01-opendev-org-main
|
||||||
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
|
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
|
# Mirrors
|
||||||
|
|
||||||
- name: letsencrypt updated mirror01-dfw-rax-main
|
- name: letsencrypt updated mirror01-dfw-rax-main
|
||||||
|
@ -11,22 +11,20 @@
|
|||||||
|
|
||||||
- name: Copy the mysqldump
|
- name: Copy the mysqldump
|
||||||
shell:
|
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
|
chdir: /home/gerrit2
|
||||||
become: gerrit2
|
|
||||||
|
|
||||||
- name: Sync the git repos
|
- name: Sync the git repos
|
||||||
shell:
|
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
|
chdir: /home/gerrit2/review_site
|
||||||
become: gerrit2
|
|
||||||
|
|
||||||
- hosts: review-test.opendev.org
|
- hosts: review-test.opendev.org
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Apply mysql dump
|
- name: Apply mysql dump
|
||||||
shell:
|
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
|
- name: Start gerrit
|
||||||
shell:
|
shell:
|
||||||
|
Loading…
Reference in New Issue
Block a user