diff --git a/ansible/install-rasp-ap.yml b/ansible/install-rasp-ap.yml index e9e390a..fd537bb 100644 --- a/ansible/install-rasp-ap.yml +++ b/ansible/install-rasp-ap.yml @@ -9,12 +9,6 @@ raspap_adblock: 0 tasks: - - name: ensure lighttpd listens on port 8080 - ansible.builtin.lineinfile: - path: /etc/lighttpd/lighttpd.conf - regexp: '^server.port' - line: server.port=8080 - - name: Check if RaspAP is already installed ansible.builtin.stat: path: /var/www/html/raspap @@ -87,13 +81,6 @@ - "set-hostapd-iface.service" - "avahi-daemon.service" - - name: Disable service raspapd restapi service - ansible.builtin.file: - path: "/etc/systemd/system/multi-user.target.wants/{{ item }}" - state: absent - with_items: - - "restapi.service" - - name: Copy dnsmasq config ansible.builtin.template: src: "butterbox-dnsmasq.conf.j2" @@ -101,3 +88,13 @@ owner: root group: root mode: '0644' + + - name: Restart service raspapd, issue daemon-reload to pick up config changes + ansible.builtin.systemd_service: + state: restarted + daemon_reload: true + name: "{{ item }}" + when: not (is_vmdb2 | bool) + with_items: + - raspapd + - set-hostapd-iface diff --git a/ansible/install-usb-viewer.yml b/ansible/install-usb-viewer.yml index 9144fca..d965dee 100644 --- a/ansible/install-usb-viewer.yml +++ b/ansible/install-usb-viewer.yml @@ -4,8 +4,8 @@ become: true tasks: - name: Copy systemd services - ansible.builtin.template: - src: "{{ item }}" + ansible.builtin.copy: + src: "{{ vmdb2_config_base_dir }}/{{ item }}" dest: "/etc/systemd/system/{{ item }}" mode: '0644' loop: diff --git a/ansible/remove-wifi-creds.yml b/ansible/remove-wifi-creds.yml index e3184ab..80880be 100644 --- a/ansible/remove-wifi-creds.yml +++ b/ansible/remove-wifi-creds.yml @@ -4,8 +4,8 @@ become: true tasks: - name: Copy wpa_supplicant config - ansible.builtin.template: - src: "wpa_supplicant.conf" + ansible.builtin.copy: + src: "{{ vmdb2_config_base_dir }}/wpa_supplicant.conf" dest: /etc/wpa_supplicant/wpa_supplicant.conf force: true mode: '0644' diff --git a/ansible/templates/hostapd.conf.j2 b/ansible/templates/hostapd.conf.j2 index 9e197c1..1f8b8e4 100644 --- a/ansible/templates/hostapd.conf.j2 +++ b/ansible/templates/hostapd.conf.j2 @@ -7,7 +7,7 @@ beacon_int=100 ssid={{ butter_name }} channel=1 hw_mode=g -ieee80211ac=1 +ieee80211n=0 interface=wlan0 wpa=none wpa_pairwise=CCMP diff --git a/ansible/templates/nginx-config.j2 b/ansible/templates/nginx-config.j2 index 262ac5e..5ef7794 100644 --- a/ansible/templates/nginx-config.j2 +++ b/ansible/templates/nginx-config.j2 @@ -8,7 +8,7 @@ server { } location ^~ /raspap { - proxy_pass http://127.0.0.1:8080; + alias /var/www/html/raspap; } location ^~ /_matrix { diff --git a/ansible/templates/serve-usb@.service b/ansible/templates/serve-usb@.service deleted file mode 100644 index 4081b72..0000000 --- a/ansible/templates/serve-usb@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Serve USB content -BindTo=dev-%i.device - -[Service] -ExecStart=/bin/sh -c '/usr/bin/on-usb-drive-mounted.sh /dev/%i' -ExecStop=/bin/sh -c 'rm /media/usb-butter/' -RemainAfterExit=yes \ No newline at end of file diff --git a/ansible/templates/udisks2-mount@.service b/ansible/templates/udisks2-mount@.service deleted file mode 100644 index c87a591..0000000 --- a/ansible/templates/udisks2-mount@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Mount service -BindTo=dev-%i.device - -[Service] -ExecStart=/bin/sh -c '/usr/bin/udisksctl mount -b /dev/%i' -ExecStop=/bin/sh -c '/usr/bin/udisksctl unmount -b /dev/%i' -RemainAfterExit=yes \ No newline at end of file diff --git a/ansible/templates/wpa_supplicant.conf b/ansible/templates/wpa_supplicant.conf deleted file mode 100644 index 5622f2e..0000000 --- a/ansible/templates/wpa_supplicant.conf +++ /dev/null @@ -1,3 +0,0 @@ -country=US -ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev -ap_scan=1 diff --git a/vmdb2-recipes/amd64_trixie.yaml b/vmdb2-recipes/amd64_trixie.yaml index 65b186e..d3c7be9 100644 --- a/vmdb2-recipes/amd64_trixie.yaml +++ b/vmdb2-recipes/amd64_trixie.yaml @@ -98,7 +98,6 @@ steps: - python3-packaging - python3-virtualenv - nginx - - lighttpd - unzip - sudo - systemd-timesyncd diff --git a/vmdb2-recipes/raspi_4_trixie.yaml b/vmdb2-recipes/raspi_4_trixie.yaml index 7c2b9ab..d622a41 100644 --- a/vmdb2-recipes/raspi_4_trixie.yaml +++ b/vmdb2-recipes/raspi_4_trixie.yaml @@ -84,7 +84,6 @@ steps: - python3-packaging - python3-virtualenv - nginx - - lighttpd - git - unzip - sudo