Compare commits
4 commits
bdddd161cd
...
94770e68e5
| Author | SHA1 | Date | |
|---|---|---|---|
| 94770e68e5 | |||
| d8db95b5d5 | |||
| 0246e9a517 | |||
| 65b712b4ef |
10 changed files with 40 additions and 16 deletions
|
|
@ -9,6 +9,12 @@
|
||||||
raspap_adblock: 0
|
raspap_adblock: 0
|
||||||
|
|
||||||
tasks:
|
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
|
- name: Check if RaspAP is already installed
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /var/www/html/raspap
|
path: /var/www/html/raspap
|
||||||
|
|
@ -81,6 +87,13 @@
|
||||||
- "set-hostapd-iface.service"
|
- "set-hostapd-iface.service"
|
||||||
- "avahi-daemon.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
|
- name: Copy dnsmasq config
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "butterbox-dnsmasq.conf.j2"
|
src: "butterbox-dnsmasq.conf.j2"
|
||||||
|
|
@ -88,13 +101,3 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
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
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Copy systemd services
|
- name: Copy systemd services
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: "{{ vmdb2_config_base_dir }}/{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "/etc/systemd/system/{{ item }}"
|
dest: "/etc/systemd/system/{{ item }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
loop:
|
loop:
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Copy wpa_supplicant config
|
- name: Copy wpa_supplicant config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: "{{ vmdb2_config_base_dir }}/wpa_supplicant.conf"
|
src: "wpa_supplicant.conf"
|
||||||
dest: /etc/wpa_supplicant/wpa_supplicant.conf
|
dest: /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
force: true
|
force: true
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ beacon_int=100
|
||||||
ssid={{ butter_name }}
|
ssid={{ butter_name }}
|
||||||
channel=1
|
channel=1
|
||||||
hw_mode=g
|
hw_mode=g
|
||||||
ieee80211n=0
|
ieee80211ac=1
|
||||||
interface=wlan0
|
interface=wlan0
|
||||||
wpa=none
|
wpa=none
|
||||||
wpa_pairwise=CCMP
|
wpa_pairwise=CCMP
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /raspap {
|
location ^~ /raspap {
|
||||||
alias /var/www/html/raspap;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /_matrix {
|
location ^~ /_matrix {
|
||||||
|
|
|
||||||
8
ansible/templates/serve-usb@.service
Normal file
8
ansible/templates/serve-usb@.service
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[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
|
||||||
8
ansible/templates/udisks2-mount@.service
Normal file
8
ansible/templates/udisks2-mount@.service
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[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
|
||||||
3
ansible/templates/wpa_supplicant.conf
Normal file
3
ansible/templates/wpa_supplicant.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
country=US
|
||||||
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||||
|
ap_scan=1
|
||||||
|
|
@ -98,6 +98,7 @@ steps:
|
||||||
- python3-packaging
|
- python3-packaging
|
||||||
- python3-virtualenv
|
- python3-virtualenv
|
||||||
- nginx
|
- nginx
|
||||||
|
- lighttpd
|
||||||
- unzip
|
- unzip
|
||||||
- sudo
|
- sudo
|
||||||
- systemd-timesyncd
|
- systemd-timesyncd
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ steps:
|
||||||
- python3-packaging
|
- python3-packaging
|
||||||
- python3-virtualenv
|
- python3-virtualenv
|
||||||
- nginx
|
- nginx
|
||||||
|
- lighttpd
|
||||||
- git
|
- git
|
||||||
- unzip
|
- unzip
|
||||||
- sudo
|
- sudo
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue