Prevent `touch` from, well, touching a file over and over again
Thanks to "badboy" on #zuul IRC for suggesting this.
Change-Id: I7f8b0c603c342ebb9c03087623df2f864453a4dd
diff --git a/roles/zuul_server/tasks/main.yaml b/roles/zuul_server/tasks/main.yaml
index 6c0ccfc..e874b63 100644
--- a/roles/zuul_server/tasks/main.yaml
+++ b/roles/zuul_server/tasks/main.yaml
@@ -82,11 +82,12 @@
group: zuul
mode: 0600
-# TODO: this is buggy, `touch` always updates...
- name: Gerrit's SSH server pubkey
file:
path: /var/lib/zuul/.ssh/known_hosts
state: touch
+ modification_time: preserve
+ access_time: preserve
owner: zuul
group: zuul
mode: 0600