1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00
iiab/roles/network/tasks/NM-debian.yml

38 lines
1 KiB
YAML
Raw Normal View History

2017-11-23 02:26:23 +00:00
# NM-debian.yml
- include_tasks: down-debian.yml
# provide keyfile layout like the XO's used way back.
- name: Create uuid for NM
shell: uuidgen
register: uuid_response
- name: Put the uuid in place
set_fact:
gen_uuid: "{{ uuid_response.stdout_lines[0] }}"
# NM might have a watcher on this path and we don't have to restart NM
- name: Copy the bridge script for has_NM
template:
dest: /etc/NetworkManager/system-connections/
src: network/bridge-br0
- name: Reload systemd
shell: systemctl daemon-reload
- name: Restart the networking service
service:
name: network-manager
state: restarted
when: not nobridge is defined and not no_net_restart
- name: Restart hostapd when WiFi is present
service:
name: hostapd
state: restarted
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
- name: dhcp_server may be affected - starting - user choice
service:
name: "{{ dhcp_service2 }}"
state: started
when: iiab_network_mode != "Appliance"