system-config/playbooks/zuul/templates/group_vars/review.yaml.j2
Clark Boylan f6a0bf7be5 Improve gerrit known_hosts management
Previously we were only managing root's known_hosts via ansible but even
then this wasn't happening because the gerrit_self_hostkey var wasn't
set anywhere. On top of that we need to manage multiple known_hosts
because gerrit must recognize itself and all of the gitea servers.
Update the code to take a dict of host key values and add each entry to
known_hosts for both the root and gerrit2 user.

We remove keyscans from tests to ensure that this update is actually
working.

Change-Id: If64c34322f64c1fb63bf2ebdcc04355fff6ebba2
2021-08-02 09:53:27 -07:00

106 lines
7.9 KiB
Django/Jinja

gerrit_ssh_rsa_key_contents: |
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAvqQkJUwEGJgqzmOmj2728ikA3Dgl4mzzRiI5zzzLhCLQktL7
UZ6hAc+851mUuQ66vciqUToerhRdNWqNlZzY8On/jXUTVdfUVlXupmDfqmtlax9n
Gi8Aayj4h9F3P3iuNQ+eXWVOyFsCmAMPzaYgWgXx2rxcIqSPq5hG+vDB9oXIpg3a
/244vtIZId1/uNnZDb5jHbZLglupynQBIZ12h2XOUiUfxL84EQnwfL2zC9d6eOjv
cYaCYJ+2VrzG972keY8SJEMLLVEd+q2hFYbbQQxLlmrFpx2G6zNc3d6KLnW0xEH+
b1yEmShcoB8iRRam+IkO+ovoQ5W9FUCmQnWqJQIDAQABAoIBAQCABKeFKDPD9EMi
j0ZlIUXRPfmm6EmAcFs46Hjbkl60H9DiF63OlHBYUBDxZnV5g8ug8CR3IUlC6sfg
u+nR4x7HQMtsSYcvaRzc0R3OOlVYEoBrXA4XRiLI0x15zw593+NUHGXjH8m0v3DR
dZTiK0GkUkOj+EMCvHEB8OMRViVaDjel+TXI6lM2UuexpYLag/u+GotDUQ8sjq4v
kT2FWzrZAGHih98oZ7AflinasGjMBr21lCRq/u3w0ieU4ZPmxpLxz9EUbWS06kQe
W2pafIhDq+4mVtDuhmb87yMMpda+TCBcCRCzA3MGDMGVzQgQvPe49R4EPRWzBWXU
vso8JSzBAo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Ve6mYN+qa2VrH2caLwBrKPiH0Xc/eK41D55dZU7IWwKYAw/NpiBaBfHavFwipI+rmEb68MH2hcimDdr/bji+0hkh3X+42dkNvmMdtkuCW6nKdAEhnXaHZc5SJR/EvzgRCfB8vbML13p46O9xhoJgn7ZWvMb3vaR5jxIkQwstUR36raEVhttBDEuWasWnHYbrM1zd3ooudbTEQf5vXISZKFygHyJFFqb4iQ76i+hDlb0VQKZCdaol test-gerrit-hostkey
gerrit_known_hosts_keys:
'[{% raw %}{{ gerrit_vhost_name }}{% endraw %}]:29418': |
[{% raw %}{{ gerrit_vhost_name }}{% endraw %}]:29418,[localhost]:29418,[127.0.0.1]:29418,[::1]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+pCQlTAQYmCrOY6aPbvbyKQDcOCXibPNGIjnPPMuEItCS0vtRnqEBz7znWZS5Drq9yKpROh6uFF01ao2VnNjw6f+NdRNV19RWVe6mYN+qa2VrH2caLwBrKPiH0Xc/eK41D55dZU7IWwKYAw/NpiBaBfHavFwipI+rmEb68MH2hcimDdr/bji+0hkh3X+42dkNvmMdtkuCW6nKdAEhnXaHZc5SJR/EvzgRCfB8vbML13p46O9xhoJgn7ZWvMb3vaR5jxIkQwstUR36raEVhttBDEuWasWnHYbrM1zd3ooudbTEQf5vXISZKFygHyJFFqb4iQ76i+hDlb0VQKZCdaol
gerrit_project_ssh_rsa_key_contents: |
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn
NhAAAAAwEAAQAAAQEAvZp+E4iOgKzeNLEc9aM/JckymWjWZpHrNdk0QMWOqh48hMB6eLSH
n5Y1ekNNJZf6t283Ix/8op8gKxNMuVBAR8vZvCQ3nVDGOSY1ZkG4brs41lIy+6pjNb/yhC
JlIq4QKH6B1u4mIYpGq4V2BUu/pUWjThTlOOXXt5XiSpt1ntfl23MFp6k8QFAHES215Lum
u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XgzAoFWEuOTb9fQK9B5FoE0qthGDF21u9FjPQqzY6JKYAIZg4/L
TYu+Fx3Q9Fr6tCUQd+cpfaQS+4LV674BrnmH8jUDoEWzbY1RAkLl4rfLejz16lmq8kfwNB
sDdDjCIR27Cn4ysfeGM2SCwtXOcKLDHD7oDf3m4DohxY3f+wAAAIEA2nuA0mwVYyG/b4+a
yw6qRJm8YAjgZMosLXIr6+bULfy6FNP6YsRupTU/ZwMtfdYlNFWJ6zSYJqq0rHfzzNpNhS
qOPJUjjJGC6JMg+vQg/OazKf1WyEBTuzieJFmcvV5qhrH+Xs/Ulbad4dRwO6L+g/OyhtaK
ojC+lpNcPYI2jdEAAAAgbW9yZHJlZEBNb250eXMtTWFjQm9vay1BaXIubG9jYWwBAgM=
-----END OPENSSH PRIVATE KEY-----
gerrit_project_ssh_rsa_pubkey_contents: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9mn4TiI6ArN40sRz1oz8lyTKZaNZmkes12TRAxY6qHjyEwHp4tIefljV6Q00ll/q3bzcjH/yinyArE0y5UEBHy9m8JDedUMY5JjVmQbhuuzjWUjL7qmM1v/KEImUirhAofoHW7iYhikarhXYFS7+lRaNOFOU45de3leJKm3We1+XbcwWnqTxAUAcRLbXku6a5eGFreec5aqw8zk4h9yRCGMTUZBWgT21TC+fCuBSYbgH8Lq1tz2hnW6OWRae8kRhLakijMfKNo6p+2rqyxnyqaMzf49bl2V8VDOtL3ZPPdik1UKSDOuj6SOvQCiARUxITMBR/FY2wTiTzWdsiIxrr gerrit-code-review-project
gerrit_replication_ssh_rsa_key_contents: |
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn
NhAAAAAwEAAQAAAQEA0IWUNM/kVT5js2Nn+ejffz66g3h37b52oDycjjl5wnf/TdI/rLRV
jZmr72/MuHUWfsupTiacz2BGocFFF2RwGp8+ZeWrPlYoVq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kkxgGzIe15C4FQwmhZY7VMZvyRAqNgKG5
zGHyqC4hIJwMCW72ROkk3wlajaoDYYW0KvY6QSxN4DbBYhfItY1lRlLmhvGxuVV21xXYiv
H8MzvGcSecAAAAgQDo0K7Dk0p24Y2HEDC9B/w1yyB4Omu0G7obCNhnXot8OGI6c4xeRcwP
8sJ5pkYbpSF3TbDJqvLs3o5aBYpmCy3orf2LsC8+POgvRyH8FNp2JzuY5XBPuNEzeulrtu
fqQJJZ6u+rX5dpX7W8uLg/7Y/zFalSpuwhgmkaGuyAiqm6GwAAAIEA5UmRjI86D9DX5Y1y
xUpbf3pxXbdZVKFHUCCHpDxoZHtJchYc0qtirdLnY84DfROb+O6c+s7cLIu1aY+DWDvN5k
1OseaIuZq2i/YoYxM+qNg3IQ2lDxsHtR2SuwEjTLIJdINy5BasUSuevDfZU71z9e5Vs+Ou
edHQJDKx5PktPWsAAAAgbW9yZHJlZEBNb250eXMtTWFjQm9vay1BaXIubG9jYWwBAgM=
-----END OPENSSH PRIVATE KEY-----
gerrit_replication_ssh_rsa_pubkey_contents: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQhZQ0z+RVPmOzY2f56N9/PrqDeHftvnagPJyOOXnCd/9N0j+stFWNmavvb8y4dRZ+y6lOJpzPYEahwUUXZHAanz5l5as+VihWq7ldcMxSPnmkC9zr65Z8eNDcM2Bzk8gx5e4DE6OgpWkc6ke9MpwI5dmfW7o53gQZkdSc94TuLr+ZCYUKo7fScsVeE+F9dT0PLyW0zU7c23PzYnkKcrB9ihpQfSfbJj9EAtsA3aA8ZdHt78i5r7+0u0JZxaWoKjkCfYqC8ofbTU61YuUO8TTgNgMC6ZzBmTRdRRRKdGun+m1fqtgIqPSi+iZpKnERgg/hPwY+gqcKh+svW6pgCDhJ gerrit-code-review-replication
gerrit_reviewdb_database_type: mariadb_container
gerrit_reviewdb_mariadb_password: password
gerrit_run_compose_up: true
gerrit_run_init: true
gerrit_run_init_dev_mode: true
gerrit_storyboard_token: 52514e74-4b8f-4d6d-a29a-a6262f97578a
gerrit_email_private_key: wjpkxebohgbid6rpuwpfrYsouxpgseluqir6yupppBczoezj
gerrit_rest_token_private_key: A83fAC8x72wxcu
gerrit_container_image: "docker.io/opendevorg/gerrit:{{ zuul_test_gerrit_version | default('3.2') }}"
gerrit_under_test: true
gerrit_launchpad_auth:
access_token: 'token'
access_secret: 'secret'
consumer_key: 'consumer_key'