From 925e42afe7dd8457d74ddd2f969f81704393659f Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 23 Nov 2017 11:52:25 +0000 Subject: [PATCH] tasks: lxc_net: Do not source non-existing network script on CentOS Commit 53a6cce9ed08 ("Use handlers to restart services and move dnsmasq to a unit file") removed the ifup-post script on CentOS but we are still sourcing it in the main network script and it's causing problems when trying to bring the lxcbr0 interface up. [root@localhost network-scripts]# ifup lxcbr0 RTNETLINK answers: File exists /etc/sysconfig/network-scripts/ifup-post: line 115: /etc/sysconfig/network-scripts/ifup-post-lxcbr0: No such file or directory Change-Id: Icf788fd82e298b7e17e784e0d27898f93e7441aa --- tasks/lxc_net.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tasks/lxc_net.yml b/tasks/lxc_net.yml index 26987cdb..b11c48d7 100644 --- a/tasks/lxc_net.yml +++ b/tasks/lxc_net.yml @@ -56,14 +56,9 @@ - name: Create networking post-up and post-down data for Red Hat lineinfile: - dest: "{{ item.dest }}" - line: "{{ item.line }}" + dest: "/etc/sysconfig/network-scripts/ifdown-post" + line: ". /etc/sysconfig/network-scripts/ifdown-post-{{ lxc_net_bridge }}" insertbefore: "^exit\ 0$" - with_items: - - dest: "/etc/sysconfig/network-scripts/ifup-post" - line: ". /etc/sysconfig/network-scripts/ifup-post-{{ lxc_net_bridge }}" - - dest: "/etc/sysconfig/network-scripts/ifdown-post" - line: ". /etc/sysconfig/network-scripts/ifdown-post-{{ lxc_net_bridge }}" when: ansible_os_family | lower == "redhat" notify: - Restart bridge