system-config/playbooks/service-review.yaml
Ian Wienand 60f3554dcd 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
2021-03-31 09:33:55 +11:00

27 lines
1.2 KiB
YAML

- hosts: "review:!disabled"
name: "Configure gerrit"
roles:
- 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'