summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/package-repository/handlers/main.yml6
-rw-r--r--ansible/roles/package-repository/tasks/main.yml16
2 files changed, 22 insertions, 0 deletions
diff --git a/ansible/roles/package-repository/handlers/main.yml b/ansible/roles/package-repository/handlers/main.yml
new file mode 100644
index 00000000..304cc873
--- /dev/null
+++ b/ansible/roles/package-repository/handlers/main.yml
@@ -0,0 +1,6 @@
+---
+- name: Restart NetworkManager
+ systemd:
+ name: NetworkManager
+ state: restarted
+ when: ansible_connection != 'docker'
diff --git a/ansible/roles/package-repository/tasks/main.yml b/ansible/roles/package-repository/tasks/main.yml
index 7dc2e76f..e2a5fd46 100644
--- a/ansible/roles/package-repository/tasks/main.yml
+++ b/ansible/roles/package-repository/tasks/main.yml
@@ -1,4 +1,20 @@
---
+- name: Disable DNS management in Network Manager
+ ini_file:
+ path: /etc/NetworkManager/NetworkManager.conf
+ state: present
+ no_extra_spaces: true
+ section: main
+ option: dns
+ value: none
+ owner: root
+ group: root
+ mode: 0644
+ backup: false
+ when: ansible_os_family == 'RedHat'
+ notify:
+ - Restart NetworkManager
+
- name: Setup resolv.conf for node to find package repository by name from infra
lineinfile:
line: "nameserver {{ hostvars[groups.infrastructure[0]].cluster_ip }}"