diff --git a/roles/openshift-postinstall/tasks/main.yml b/roles/openshift-postinstall/tasks/main.yml index 1020bc1..dc2536f 100644 --- a/roles/openshift-postinstall/tasks/main.yml +++ b/roles/openshift-postinstall/tasks/main.yml @@ -11,3 +11,12 @@ register: oc failed_when: oc.rc > 0 and 'Error from server (NotFound):' not in oc.stderr changed_when: oc.rc == 0 + + - name: Update the router to allow Wildcards + command: oc set env dc/router ROUTER_ALLOW_WILDCARD_ROUTES=true -n default + + - name: Update the dnsmasq configuration to reference the wildcard DNS entry + template: src=wildcard.conf dest=/etc/dnsmasq.d/wildcard.conf + + - name: Restart the dnsmasq service + service: name=dnsmasq enabled=yes state=restarted diff --git a/roles/openshift-postinstall/templates/wildcard.conf b/roles/openshift-postinstall/templates/wildcard.conf new file mode 100644 index 0000000..36cb460 --- /dev/null +++ b/roles/openshift-postinstall/templates/wildcard.conf @@ -0,0 +1,2 @@ + +address=/{{ openshift_master_default_subdomain }}/{{ hostvars[groups['masters'][0]]['ansible_default_ipv4']['address'] }}