diff --git a/roles/network/tasks/ifcfg_mods.yml b/roles/network/tasks/ifcfg_mods.yml index b5a3f5f9c..ce47f5133 100644 --- a/roles/network/tasks/ifcfg_mods.yml +++ b/roles/network/tasks/ifcfg_mods.yml @@ -26,16 +26,22 @@ with_items: - "{{ discovered_lan_iface }}" -- name: bind may be affected - service: name={{ dns_service }} state=stopped +- name: BIND may be affected + service: + name: "{{ dns_service }}" + state: stopped when: named_install and dnsmasq_enabled - name: dhcpd_server may be affected - stopping dhcpd - service: name=dhcpd state=stopped + service: + name: dhcpd + state: stopped when: dhcpd_install - name: dhcpd_server may be affected - stopping dnsmasq - service: name=dnsmasq state=stopped + service: + name: dnsmasq + state: stopped when: dnsmasq_install - name: Stop the LAN/Bridge deleting iiab-LAN @@ -65,15 +71,17 @@ # can be more than one wired interface - name: Wired enslaving ## lan_list_result ## to Bridge - template: src=network/ifcfg-slave.j2 - dest=/etc/sysconfig/network-scripts/ifcfg-{{ item|trim }} + template: + src: network/ifcfg-slave.j2 + dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item|trim }}" when: iiab_lan_iface == "br0" and item|trim != iiab_wireless_lan_iface and item|trim != iiab_wan_iface with_items: - - "{{ lan_list_result.stdout_lines }}" + - "{{ lan_list_result.stdout_lines }}" - name: WiFi enslaving {{ iiab_wireless_lan_iface }} to Bridge - template: src=network/wifi-slave.j2 - dest=/etc/sysconfig/network-scripts/ifcfg-{{ iiab_wireless_lan_iface }} + template: + src: network/wifi-slave.j2 + dest: "/etc/sysconfig/network-scripts/ifcfg-{{ iiab_wireless_lan_iface }}" when: iiab_lan_iface == "br0" and iiab_wireless_lan_iface != "none" tags: - network @@ -81,7 +89,7 @@ - include_tasks: enable_wan.yml when: not installing and not iiab_demo_mode -- name: ask systemd to reread the unit files, picks up changes done +- name: Ask systemd to reread the unit files, picks up changes done systemd: daemon_reload: yes when: not installing @@ -111,7 +119,7 @@ ignore_errors: True when: iiab_lan_iface == "br0" and item|trim != iiab_wireless_lan_iface and item|trim != iiab_wan_iface and not iiab_demo_mode with_items: - - "{{ lan_list_result.stdout_lines }}" + - "{{ lan_list_result.stdout_lines }}" #- name: restart hostapd when wifi is present # service: name=hostapd state=started