tasks: lxc_net: Do not source non-existing network script on CentOS
Commit 53a6cce9ed
("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
This commit is contained in:
parent
670b47bbfb
commit
925e42afe7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user