From e579469836eda25dbbd7d594c51442449822e76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Mon, 3 Jul 2017 10:45:18 +0200 Subject: [PATCH] enable local name resolution + enable wildcard on router --- roles/openshift-postinstall/tasks/main.yml | 9 +++++++++ roles/openshift-postinstall/templates/wildcard.conf | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 roles/openshift-postinstall/templates/wildcard.conf 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'] }}