From 9f871afbc4d9cd2acc06180fbc0401daaf6defb6 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 16 Jul 2019 10:14:56 +0200 Subject: [PATCH] copr: backend: use NetworkManager to configure eth1 --- roles/copr/backend/tasks/network.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/copr/backend/tasks/network.yml b/roles/copr/backend/tasks/network.yml index 4ce6d597d6..1203846267 100644 --- a/roles/copr/backend/tasks/network.yml +++ b/roles/copr/backend/tasks/network.yml @@ -1,12 +1,18 @@ - name: copy ifcfg-eth1 copy: src="ifcfg-eth1" dest=/etc/sysconfig/network-scripts/ owner=root group=root mode=644 + +- name: enable network-manager to use the /etc/sysconfig/network-scripts + ini_file: + path: /etc/NetworkManager/NetworkManager.conf + section: main + option: plugins + value: ifcfg-rh + backup: yes notify: - - restart network + - restart NetworkManager - name: set up gateway - lineinfile: dest=/etc/sysconfig/network line="GATEWAYDEV=eth0" - #notify: - #- restart network + lineinfile: dest=/etc/sysconfig/network line="GATEWAYDEV=eth0" - name: restart network meta: flush_handlers