Commit a34b0692 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

stat.path doesn't exist in old ansible version

parent 2e374f7e
......@@ -15,12 +15,12 @@
register: iface_config
- name: Disable network default route on interface eth0/CentOS
lineinfile: dest={{ ifcfg_eth0.stat.path }} state=present line="DEFROUTE=no"
lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth0 state=present line="DEFROUTE=no"
when: ifcfg_eth0.stat.exists == True and gateway_file.stat.exists == True
- name: Disable network default route on interface eth0/Debian-Ubuntu
lineinfile:
dest: "{{ iface_config.stat.path }}"
dest: /etc/network/interfaces
state: present
line: "post-up route del default dev eth0"
insertafter: "iface eth0 inet dhcp"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment