get the registry mirror working

Change-Id: I17731875cf88ef30a3178c1a70181dc793c12a65
(cherry picked from commit fac79ca17d8491ab85a1c202074c407f404eab47)
diff --git a/roles/compute-node/tasks/main.yml b/roles/compute-node/tasks/main.yml
index b5d9c3a..e50cc4e 100644
--- a/roles/compute-node/tasks/main.yml
+++ b/roles/compute-node/tasks/main.yml
@@ -29,12 +29,20 @@
     insertafter: '^DOCKER_OPTS'
   register: docker_config
 
+- name: Ensure Docker Registry Mirror
+  become: yes
+  lineinfile:
+    dest: /etc/default/docker
+    line: 'DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://docker-registry:5001"'
+    insertafter: '^DOCKER_OPTS'
+  register: docker_config_mirror
+
 - name: Docker Restart
   become: yes
   service:
     name=docker
     state=restarted
-  when: docker_config.changed
+  when: docker_config.changed or docker_config_mirror.changed
 
 - name: Ensure Docker Ansible Support
   become: yes