From 7908e77de14c330fc8e90e7021ea7e0ac8a4bc1f Mon Sep 17 00:00:00 2001 From: Sergey Bubnov Date: Wed, 7 Nov 2018 10:05:43 +0400 Subject: [PATCH] force enable interfaces --- roles/common/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 121d977..d8f31f6 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -90,6 +90,18 @@ async: 100 poll: 0 +- name: enable interfaces + replace: + path: "/etc/net/ifaces/{{item.key}}/options" + regexp: '^DISABLED=.*' + replace: 'DISABLED=no' + with_dict: "{{node.net}}" + +- name: restart network + service: + name: network + state: restarted + - name: update .tmp/ssh_config after NICs reconfiguration include_role: name="inventory"