Browse Source

Infrastructure - Set OpenShift Registry

* TODO: update to secure when 'add volume' feature available in origin
Jhon Honce 9 years ago
parent
commit
17c6b4c5da
1 changed files with 11 additions and 0 deletions
  1. 11 0
      roles/openshift_node/tasks/main.yml

+ 11 - 0
roles/openshift_node/tasks/main.yml

@@ -56,6 +56,17 @@
   notify:
   - restart openshift-node
 
+- stat: path=/etc/sysconfig/docker
+  register: docker_check
+
+  # TODO: Enable secure registry when code available in origin
+- name: Secure OpenShift Registry
+  lineinfile:
+    dest: /etc/sysconfig/docker
+    regexp: '^OPTIONS=.*'
+    line: "OPTIONS='--insecure-registry=172.30.0.0/16 --selinux-enabled'"
+  when: docker_check.stat.isreg
+
 - name: Allow NFS access for VMs
   seboolean: name=virt_use_nfs state=yes persistent=yes