Skip to content

Commit

Permalink
tasks: lxc_net: Do not source non-existing network script on CentOS
Browse files Browse the repository at this point in the history
Commit 53a6cce ("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
  • Loading branch information
Markos Chandras committed Nov 23, 2017
1 parent 670b47b commit 925e42a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tasks/lxc_net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 925e42a

Please sign in to comment.