summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMichael Gugino <gugino.michael@yahoo.com>2017-11-28 10:34:12 -0500
committerGitHub <noreply@github.com>2017-11-28 10:34:12 -0500
commitb9ab765528ff2e7f9aa46b6942d74027ef9b6799 (patch)
tree446766a541618590b79ff263e5edc5de580ec25a /roles
parentc7645af60a5411af83b04fb6a5617887d3b39183 (diff)
parent73bf3e7137d80ba5b225108f39240c43d385a1ea (diff)
downloadopenshift-b9ab765528ff2e7f9aa46b6942d74027ef9b6799.tar.gz
openshift-b9ab765528ff2e7f9aa46b6942d74027ef9b6799.tar.bz2
openshift-b9ab765528ff2e7f9aa46b6942d74027ef9b6799.tar.xz
openshift-b9ab765528ff2e7f9aa46b6942d74027ef9b6799.zip
Merge pull request #6268 from mgugino-upstream-stage/combine-dnsmasq-with-node
Combine openshift_node and openshift_node_dnsmasq
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_node/defaults/main.yml7
-rwxr-xr-xroles/openshift_node/files/networkmanager/99-origin-dns.sh (renamed from roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh)0
-rw-r--r--roles/openshift_node/handlers/main.yml11
-rw-r--r--roles/openshift_node/meta/main.yml1
-rw-r--r--roles/openshift_node/tasks/dnsmasq.yml (renamed from roles/openshift_node_dnsmasq/tasks/main.yml)4
-rw-r--r--roles/openshift_node/tasks/dnsmasq/network-manager.yml (renamed from roles/openshift_node_dnsmasq/tasks/network-manager.yml)0
-rw-r--r--roles/openshift_node/tasks/dnsmasq/no-network-manager.yml (renamed from roles/openshift_node_dnsmasq/tasks/no-network-manager.yml)0
-rw-r--r--roles/openshift_node/tasks/main.yml2
-rw-r--r--roles/openshift_node/tasks/upgrade.yml3
-rw-r--r--roles/openshift_node/templates/node-dnsmasq.conf.j2 (renamed from roles/openshift_node_dnsmasq/templates/node-dnsmasq.conf.j2)0
-rw-r--r--roles/openshift_node/templates/origin-dns.conf.j2 (renamed from roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2)0
-rw-r--r--roles/openshift_node_dnsmasq/README.md27
-rw-r--r--roles/openshift_node_dnsmasq/defaults/main.yml7
-rw-r--r--roles/openshift_node_dnsmasq/handlers/main.yml11
-rw-r--r--roles/openshift_node_dnsmasq/meta/main.yml15
15 files changed, 23 insertions, 65 deletions
diff --git a/roles/openshift_node/defaults/main.yml b/roles/openshift_node/defaults/main.yml
index 62208c155..5a0c09f5c 100644
--- a/roles/openshift_node/defaults/main.yml
+++ b/roles/openshift_node/defaults/main.yml
@@ -1,6 +1,13 @@
---
openshift_node_debug_level: "{{ debug_level | default(2) }}"
+openshift_node_dnsmasq_install_network_manager_hook: true
+
+# lo must always be present in this list or dnsmasq will conflict with
+# the node's dns service.
+openshift_node_dnsmasq_except_interfaces:
+- lo
+
r_openshift_node_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
r_openshift_node_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
diff --git a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh b/roles/openshift_node/files/networkmanager/99-origin-dns.sh
index f4e48b5b7..f4e48b5b7 100755
--- a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
+++ b/roles/openshift_node/files/networkmanager/99-origin-dns.sh
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index b102c1b18..229c6bbed 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -1,4 +1,15 @@
---
+- name: restart NetworkManager
+ systemd:
+ name: NetworkManager
+ state: restarted
+ enabled: True
+
+- name: restart dnsmasq
+ systemd:
+ name: dnsmasq
+ state: restarted
+
- name: restart openvswitch
systemd:
name: openvswitch
diff --git a/roles/openshift_node/meta/main.yml b/roles/openshift_node/meta/main.yml
index c32aa1600..373e0e1bd 100644
--- a/roles/openshift_node/meta/main.yml
+++ b/roles/openshift_node/meta/main.yml
@@ -22,6 +22,5 @@ dependencies:
- role: openshift_docker
- role: openshift_cloud_provider
when: not (openshift_node_upgrade_in_progress | default(False))
-- role: openshift_node_dnsmasq
- role: lib_utils
when: openshift_node_upgrade_in_progress | default(False)
diff --git a/roles/openshift_node_dnsmasq/tasks/main.yml b/roles/openshift_node/tasks/dnsmasq.yml
index a33b78780..22bdce6c6 100644
--- a/roles/openshift_node_dnsmasq/tasks/main.yml
+++ b/roles/openshift_node/tasks/dnsmasq.yml
@@ -59,9 +59,9 @@
state: started
# Dynamic NetworkManager based dispatcher
-- include_tasks: ./network-manager.yml
+- include_tasks: dnsmasq/network-manager.yml
when: network_manager_active | bool
# Relies on ansible in order to configure static config
-- include_tasks: ./no-network-manager.yml
+- include_tasks: dnsmasq/no-network-manager.yml
when: not network_manager_active | bool
diff --git a/roles/openshift_node_dnsmasq/tasks/network-manager.yml b/roles/openshift_node/tasks/dnsmasq/network-manager.yml
index e5a92a630..e5a92a630 100644
--- a/roles/openshift_node_dnsmasq/tasks/network-manager.yml
+++ b/roles/openshift_node/tasks/dnsmasq/network-manager.yml
diff --git a/roles/openshift_node_dnsmasq/tasks/no-network-manager.yml b/roles/openshift_node/tasks/dnsmasq/no-network-manager.yml
index dede2fb8f..dede2fb8f 100644
--- a/roles/openshift_node_dnsmasq/tasks/no-network-manager.yml
+++ b/roles/openshift_node/tasks/dnsmasq/no-network-manager.yml
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 8e9d1d1b5..d46b1f9c3 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -6,6 +6,8 @@
- deployment_type == 'openshift-enterprise'
- not openshift_use_crio | default(false)
+- include: dnsmasq.yml
+
- name: setup firewall
import_tasks: firewall.yml
diff --git a/roles/openshift_node/tasks/upgrade.yml b/roles/openshift_node/tasks/upgrade.yml
index fb21b39a1..ff3478800 100644
--- a/roles/openshift_node/tasks/upgrade.yml
+++ b/roles/openshift_node/tasks/upgrade.yml
@@ -179,5 +179,4 @@
retries: 24
delay: 5
-- include_role:
- name: openshift_node_dnsmasq
+- include_tasks: dnsmasq.yml
diff --git a/roles/openshift_node_dnsmasq/templates/node-dnsmasq.conf.j2 b/roles/openshift_node/templates/node-dnsmasq.conf.j2
index 3caa3bd4a..3caa3bd4a 100644
--- a/roles/openshift_node_dnsmasq/templates/node-dnsmasq.conf.j2
+++ b/roles/openshift_node/templates/node-dnsmasq.conf.j2
diff --git a/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 b/roles/openshift_node/templates/origin-dns.conf.j2
index 6543c7c3e..6543c7c3e 100644
--- a/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2
+++ b/roles/openshift_node/templates/origin-dns.conf.j2
diff --git a/roles/openshift_node_dnsmasq/README.md b/roles/openshift_node_dnsmasq/README.md
deleted file mode 100644
index 4596190d7..000000000
--- a/roles/openshift_node_dnsmasq/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-OpenShift Node DNS resolver
-===========================
-
-Configure dnsmasq to act as a DNS resolver for an OpenShift node.
-
-Requirements
-------------
-
-Role Variables
---------------
-
-From this role:
-
-| Name | Default value | Description |
-|-----------------------------------------------------|---------------|-----------------------------------------------------------------------------------|
-| openshift_node_dnsmasq_install_network_manager_hook | true | Install NetworkManager hook updating /etc/resolv.conf with local dnsmasq instance |
-
-Dependencies
-------------
-
-* openshift_common
-* openshift_node_facts
-
-License
--------
-
-Apache License Version 2.0
diff --git a/roles/openshift_node_dnsmasq/defaults/main.yml b/roles/openshift_node_dnsmasq/defaults/main.yml
deleted file mode 100644
index ebcff46b5..000000000
--- a/roles/openshift_node_dnsmasq/defaults/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-openshift_node_dnsmasq_install_network_manager_hook: true
-
-# lo must always be present in this list or dnsmasq will conflict with
-# the node's dns service.
-openshift_node_dnsmasq_except_interfaces:
-- lo
diff --git a/roles/openshift_node_dnsmasq/handlers/main.yml b/roles/openshift_node_dnsmasq/handlers/main.yml
deleted file mode 100644
index 9f98126a0..000000000
--- a/roles/openshift_node_dnsmasq/handlers/main.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- name: restart NetworkManager
- systemd:
- name: NetworkManager
- state: restarted
- enabled: True
-
-- name: restart dnsmasq
- systemd:
- name: dnsmasq
- state: restarted
diff --git a/roles/openshift_node_dnsmasq/meta/main.yml b/roles/openshift_node_dnsmasq/meta/main.yml
deleted file mode 100644
index d80ed1b72..000000000
--- a/roles/openshift_node_dnsmasq/meta/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-galaxy_info:
- author: Scott Dodson
- description: OpenShift Node DNSMasq support
- company: Red Hat, Inc.
- license: Apache License, Version 2.0
- min_ansible_version: 2.2
- platforms:
- - name: EL
- versions:
- - 7
- categories:
- - cloud
-dependencies:
-- role: openshift_node_facts