Write JSON to a file

Change-Id: Id42678b799273c744c1bc455515875187cf8df3e
diff --git a/xos/synchronizer/steps/sync_host.yaml b/xos/synchronizer/steps/sync_host.yaml
index 55dc70b..4bfd789 100644
--- a/xos/synchronizer/steps/sync_host.yaml
+++ b/xos/synchronizer/steps/sync_host.yaml
@@ -4,5 +4,10 @@
 
   tasks:
   - name: Add host entry for fabric
-    command: curl -sS --user onos:rocks -X POST -HContent-Type:application/json -d '{{ rest_json }}' http://{{ rest_hostname }}:{{ rest_port }}/{{ rest_endpoint }}
-
+    uri:
+      url: http://{{ rest_hostname }}:{{ rest_port }}/{{ rest_endpoint }}
+      method: POST
+      user: onos
+      password: rocks
+      body: "{{ '{{' }} lookup('file', '{{ files_dir }}/{{ rest_config.fn }}') {{ '}}' }}"
+      body_format: json
\ No newline at end of file