Couple of gerritbot role cleanups

Change restart mode to always instead of 'no' as testing shows we won't
restart in a loop in CI and we want production to restart automatically.
Also add ssh pubkey contents for completeness and simplicity if we need
to find those in the future.

Change-Id: I81573a1ad1574419194eb3088070dda95fb81fff
This commit is contained in:
Clark Boylan 2020-08-10 10:42:20 -07:00
parent 506a11f9d2
commit e97d031d68
3 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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