summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Hart <matthew.hart@linaro.org>2015-11-18 14:01:10 +0000
committerMatt Hart <matthew.hart@linaro.org>2015-12-03 17:34:11 +0000
commitd56eaff0b399b5bc98f68366ae4dd02351cc47ef (patch)
tree79092db2389fae3a399399b173d267f1352d32bf
parent8e29bed5daa61f889fa72e463efb8abfdc06f666 (diff)
Add gerrit crontab for syncing SSH keys
Create a crontab on git-review servers to run the SSH key sync script. The user/pass/url is completed from the shared-credential repo. Change-Id: Iec7a2400fdcb887a45c6f6029f5a054db8047c84 Reviewed-on: https://review.linaro.org/9038 Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
-rw-r--r--per-service/git-servers/roles/cronjobs/tasks/main.yml11
-rw-r--r--per-service/git-servers/roles/cronjobs/templates/gerrit4
2 files changed, 15 insertions, 0 deletions
diff --git a/per-service/git-servers/roles/cronjobs/tasks/main.yml b/per-service/git-servers/roles/cronjobs/tasks/main.yml
index cc845705..58a8bd4c 100644
--- a/per-service/git-servers/roles/cronjobs/tasks/main.yml
+++ b/per-service/git-servers/roles/cronjobs/tasks/main.yml
@@ -14,6 +14,17 @@
- android
- git
+- name: Install gerrit crontab
+ template: src=gerrit dest=/etc/cron.d/gerrit
+ owner=root
+ group=root
+ mode=0644
+ when: hosttype == "git-review"
+ tags:
+ - cron
+ - install
+ - update
+
#
# Note: It's assumed that choices below are exlcusive - particular
# service will either want to whitelist or blacklist some projects
diff --git a/per-service/git-servers/roles/cronjobs/templates/gerrit b/per-service/git-servers/roles/cronjobs/templates/gerrit
new file mode 100644
index 00000000..8aa269c0
--- /dev/null
+++ b/per-service/git-servers/roles/cronjobs/templates/gerrit
@@ -0,0 +1,4 @@
+MAILTO=linaro-infrastructure-errors@lists.linaro.org
+
+#Ansible: Update gerrit SSH keys from LDAP
+*/10 * * * * {{git_user}} {{tools_checkout_dir}}/linaro-git-tools/update-gerrit-keys.py --username {{gerrit_http_username}} --password {{gerrit_http_password}} --base {{gerrit_http_base}}