diff --git a/playbooks/roles/gerritbot/files/docker-compose.yaml b/playbooks/roles/gerritbot/files/docker-compose.yaml index 0d1f9e2b9d..79b45d34f7 100644 --- a/playbooks/roles/gerritbot/files/docker-compose.yaml +++ b/playbooks/roles/gerritbot/files/docker-compose.yaml @@ -6,10 +6,7 @@ services: gerritbot: image: docker.io/opendevorg/gerritbot:latest network_mode: host - # TODO For testing our broken config may cause this to restart - # in a loop making freenode sad. Avoid that for now while we - # sort out how to test this. - restart: 'no' + restart: always volumes: # This contains the main config, channel config, and ssh key - /etc/gerritbot:/etc/gerritbot diff --git a/playbooks/roles/gerritbot/tasks/main.yaml b/playbooks/roles/gerritbot/tasks/main.yaml index b8b8437a84..5225080a74 100644 --- a/playbooks/roles/gerritbot/tasks/main.yaml +++ b/playbooks/roles/gerritbot/tasks/main.yaml @@ -38,6 +38,14 @@ group: root mode: 0600 +- name: Put gerritbot ssh pubkey in place + copy: + content: "{{ gerritbot_ssh_pubkey }}" + dest: /etc/gerritbot/gerritbot_rsa.pub + owner: root + group: root + mode: 0600 + - name: Ensure /etc/gerritbot-docker directory file: state: directory diff --git a/playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2 b/playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2 index 7223b2b8ac..08cd3bcfb2 100644 --- a/playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2 +++ b/playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2 @@ -44,3 +44,5 @@ gerritbot_ssh_key: | cXQaQheBjtMHv9eMHbVu2pru0MRk1OMWXhwLS1XC0u0ZukL+oBt6BPdTWbXakQm/Lr++Ou 60qDzGhMay/gX+FlAAAAEWNsYXJrQG5pYmJsZXIubGFuAQ== -----END OPENSSH PRIVATE KEY----- +gerritbot_ssh_pubkey: | + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwIJb83kJZ8upR87nUalNgWIXVrqg1VE6PWXrsl+2qXuKhw6ehL9sFSA1avIuC3zMZ4J2Mxkw6XN473MizxPsaEIz/W6GFrXUwNi7LZbFeZGs5aSA6yq91DxluvJBOg1FueuaRM9WlAtUyj6L2UP+31JQo8BnWaYykQxBwDc/DHzG0Z1klkevh49K69qXz0mfxpRcF5NVDaB+jqJ99CeoAcnBAOOCyQzjVN+5lpCc2kVv2MGknryxadX/VVY7o+NYkHRR86XAU64H3bSSmid+feiB7yaUfhoQdGp43y4JJV7AtT/hVVLGVXr2OltoWkbMJafi1ju15urj+y4Ii8mk/ gerritbot@test.eavesdrop.openstack.org