diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-07-01 15:51:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 15:51:58 -0400 |
commit | 50f63b2c5d1c9bcbd6d11fcad68813735ab8f6db (patch) | |
tree | 69a0a2b73d4a2c75e12516998732aa254782c64a | |
parent | ef0c95df08b715edd91c84ffe77c86dc8234d6a0 (diff) | |
parent | 3f51b9847508ed0334d6d5c9d5717e83578668ba (diff) | |
download | openshift-50f63b2c5d1c9bcbd6d11fcad68813735ab8f6db.tar.gz openshift-50f63b2c5d1c9bcbd6d11fcad68813735ab8f6db.tar.bz2 openshift-50f63b2c5d1c9bcbd6d11fcad68813735ab8f6db.tar.xz openshift-50f63b2c5d1c9bcbd6d11fcad68813735ab8f6db.zip |
Merge pull request #2112 from sdodson/dnsmasq-additional-config
Add support for supplying a dnsmasq.conf file
-rw-r--r-- | inventory/byo/hosts.origin.example | 5 | ||||
-rw-r--r-- | inventory/byo/hosts.ose.example | 5 | ||||
-rw-r--r-- | roles/openshift_node_dnsmasq/handlers/main.yml | 7 | ||||
-rw-r--r-- | roles/openshift_node_dnsmasq/tasks/main.yml | 11 |
4 files changed, 25 insertions, 3 deletions
diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index 7c9c7152b..ef5488d67 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -381,7 +381,10 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults # to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot # be used with 1.0 and 3.0. -# openshift_use_dnsmasq=False +#openshift_use_dnsmasq=False +# Define an additional dnsmasq.conf file to deploy to /etc/dnsmasq.d/openshift-ansible.conf +# This is useful for POC environments where DNS may not actually be available yet. +#openshift_node_dnsmasq_additional_config_file=/home/bob/ose-dnsmasq.conf # Global Proxy Configuration # These options configure HTTP_PROXY, HTTPS_PROXY, and NOPROXY environment diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example index 55f9fa66c..b4c6ff9b5 100644 --- a/inventory/byo/hosts.ose.example +++ b/inventory/byo/hosts.ose.example @@ -376,7 +376,10 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults # to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot # be used with 1.0 and 3.0. -# openshift_use_dnsmasq=False +#openshift_use_dnsmasq=False +# Define an additional dnsmasq.conf file to deploy to /etc/dnsmasq.d/openshift-ansible.conf +# This is useful for POC environments where DNS may not actually be available yet. +#openshift_node_dnsmasq_additional_config_file=/home/bob/ose-dnsmasq.conf # Global Proxy Configuration # These options configure HTTP_PROXY, HTTPS_PROXY, and NOPROXY environment diff --git a/roles/openshift_node_dnsmasq/handlers/main.yml b/roles/openshift_node_dnsmasq/handlers/main.yml index 7e9e4d299..7d43b6106 100644 --- a/roles/openshift_node_dnsmasq/handlers/main.yml +++ b/roles/openshift_node_dnsmasq/handlers/main.yml @@ -1,5 +1,10 @@ --- - name: restart NetworkManager - service: + service: name: NetworkManager state: restarted + +- name: restart dnsmasq + service: + name: dnsmasq + state: restarted diff --git a/roles/openshift_node_dnsmasq/tasks/main.yml b/roles/openshift_node_dnsmasq/tasks/main.yml index 7147b78f5..bd9a0ffb6 100644 --- a/roles/openshift_node_dnsmasq/tasks/main.yml +++ b/roles/openshift_node_dnsmasq/tasks/main.yml @@ -17,6 +17,17 @@ template: src: origin-dns.conf.j2 dest: /etc/dnsmasq.d/origin-dns.conf + notify: restart dnsmasq + +- name: Deploy additional dnsmasq.conf + template: + src: "{{ openshift_node_dnsmasq_additional_config_file }}" + dest: /etc/dnsmasq.d/openshift-ansible.conf + owner: root + group: root + mode: 0644 + when: openshift_node_dnsmasq_additional_config_file is defined + notify: restart dnsmasq # Dynamic NetworkManager based dispatcher - include: ./network-manager.yml |