From 60f3554dcd967b1c2de17c92cd7dd6b5d9b04a02 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 30 Mar 2021 13:42:48 +1100 Subject: [PATCH] review01.openstack.org: add key for gerrit data copying Adding this key allows us to safely rsync data in a R/O fashion from the production server to the new server and will be useful as we deploy review02.opendev.org. The key is hard-coded for one on the new server. Change-Id: I227876afafcb48715324ca35afdc0bff2492b29a --- playbooks/service-review.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/playbooks/service-review.yaml b/playbooks/service-review.yaml index 24da323dc6..65cb17a484 100644 --- a/playbooks/service-review.yaml +++ b/playbooks/service-review.yaml @@ -4,3 +4,23 @@ - iptables - install-docker - gerrit + +# NOTE(ianw) 2021-03-30 : This is just temporary to facilitate bulk +# data transfer of data between the old and new server. +- hosts: "review01.openstack.org" + name: Setup remote gerrit + tasks: + - name: Install rrsync + shell: + cmd: | + mkdir /home/gerrit2/bin/ + gunzip /usr/share/doc/rsync/scripts/rrsync.gz -c > /home/gerrit2/bin/rrsync + chmod a+x /home/gerrit2/bin/rrsync + creates: '/home/gerrit2/bin/rrsync' + + - name: Install review02.opendev.org copying key + authorized_key: + user: gerrit2 + state: present + key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVuhTMAz1H2Jr9AC3py9A0vlNna6Sdt4yrvZOayxukPqQ7GPZd+Mo7MVyypxLD479N2mA09JAdsbq1eTiPP8ksEkB+dNxZzw8mY1653R/IXSW6J9xPcoDa88HF2s/xHN24IWzgiDjNNe79AQ+sKleByEQZ++xXny3MRpy258hKUvAtjjOLOnM1PBs8JNOzBL+UPgWRgSX6GG0qywJZqjD1Qx5kvH9RTRLi+tcMhEi4laN7BYvn4csY0sYzTzPG4ZTu3ootIJoRlQGtQ0LmoFO1vSwyEJUags6/ZZGjgy3jl3kwcU/b8ZnFlF4MDw1OB1QqMb4r6bMHbXNIupp4zJbz' + key_options: 'command="/home/gerrit2/bin/rrsync -ro /home/gerrit2",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty'