diff --git a/tasks/main.yml b/tasks/main.yml
index 1b0e2b08e745abe731f4320fdbf477397b27921e..894677588f56fe2c76f0a8c8ec7ab85c7ad98170 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -5,6 +5,9 @@
   template:
     dest: /etc/mongod.conf
     src: mongod.conf.j2
+    owner: root
+    group: root
+    mode: 0644
 
 - name: start and enable mongodb
   systemd: