bootstrap: fix file permissions on `instance_data.json` during bootstrap (Bug 1550782)
authorConnor Sheehan <sheehan@mozilla.com>
Tue, 14 May 2019 10:28:40 -0400
changeset 7023 663cd30b7a2729fad9dfad73332bb993cdf9b18c
parent 7022 ccc7fbade54f2e023934fba8bc60b62bac14e7e5
child 7024 d18e8a095ea4cca195118d74009c7bb98fa11be0
push id3492
push usercosheehan@mozilla.com
push dateTue, 14 May 2019 14:31:56 +0000
treeherderversion-control-tools@663cd30b7a27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1550782
bootstrap: fix file permissions on `instance_data.json` during bootstrap (Bug 1550782) Something in the bootstrap procedure sets ownership of this file from `hg:hg` to `1001:1002` during the bootstrap playbook. Here we reset the permissions to the desired state once bootstrapping is complete.
ansible/bootstrap-hgweb.yml
--- a/ansible/bootstrap-hgweb.yml
+++ b/ansible/bootstrap-hgweb.yml
@@ -110,16 +110,24 @@
     - name: enable try repo in replication rules
       ini_file:
         path: /etc/mercurial/vcsreplicator.ini
         section: replicationrules
         option: include.tryrepos
         value: 're:\{moz\}/try.*'
         state: present
 
+    - name: fix permissions on instance_data.json
+      file:
+        path: /var/hg/instance_data.json
+        owner: hg
+        group: hg
+        mode: 0600
+        state: file
+
     - name: turn on vcsreplicator
       service: name=vcsreplicator@{{ item }}.service
                state=started
       with_items:
         - '0'
         - '1'
         - '2'
         - '3'