-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathplaybook.yml
31 lines (27 loc) · 1 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- hosts: all
gather_facts: False
tasks:
- name: Gathering facts
ubus: cmd=facts
- name: Installing dependencies for file-related modules
opkg: pkg=luaposix,coreutils-sha1sum state=present update_cache=yes
- name: Securing uhttpd - Disable listening on wan
uci: name={{ item.key }} value={{ uci.state.network.lan.ipaddr }}:{{ item.port }} autocommit=false
with_items:
- { key: 'uhttpd.main.listen_http', port: '80' }
- { key: 'uhttpd.main.listen_https', port: '443' }
notify:
- uci commit
- uhttp reload
- name: Securing dropbear - Disable login from wan
uci: name=dropbear.@dropbear[0].Interface value=br-lan autocommit=false
notify:
- uci commit
- dropbear reload
handlers:
- name: uci commit
raw: uci commit
- name: uhttp reload
raw: /etc/init.d/uhttpd reload
- name: dropbear reload
raw: /etc/init.d/dropbear reload