--- - name: Set up systemd networking ansible.builtin.import_tasks: file: systemd_networking.yml tags: systemd_networking - name: Set up devices ansible.builtin.import_tasks: file: systemd_networking_devices.yml tags: devices - name: Shut down legacy networking ansible.builtin.import_tasks: file: legacy_networking.yml tags: legacy_networking # Deploy hostapd configuration - name: Deploy hostapd configuration ansible.builtin.template: src: hostapd.conf.j2 dest: /etc/hostapd/hostapd.conf mode: "0644" notify: Restart hostapd # Start hostapd - name: Enable and start hostapd ansible.builtin.systemd: name: hostapd enabled: true state: started