blob: bd9a0ffb6ff0efc0ff81d4284a9d0fe92698c2c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
- name: Check for NetworkManager service
command: >
systemctl show NetworkManager
register: nm_show
changed_when: false
- name: Set fact using_network_manager
set_fact:
network_manager_active: "{{ True if 'ActiveState=active' in nm_show.stdout else False }}"
- name: Install dnsmasq
action: "{{ ansible_pkg_mgr }} name=dnsmasq state=installed"
when: not openshift.common.is_atomic | bool
- name: Install dnsmasq configuration
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
when: network_manager_active | bool
# Relies on ansible in order to configure static config
- include: ./no-network-manager.yml
when: not network_manager_active | bool
|