-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathconditional_packages.yml
97 lines (86 loc) · 2.47 KB
/
conditional_packages.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
- name: "Add irqbalance if multicore"
set_fact:
packages: "{{ packages + ['irqbalance'] }}"
when:
- multicore|default(false)|bool
- name: "Add airos-dfs-reset if configured"
set_fact:
packages: "{{ packages + ['airos-dfs-reset'] }}"
when:
- airos_dfs_reset|default([])|length > 0
- role == 'corerouter'
- name: "Add Dawn + Luci app for corerouters"
set_fact:
packages: "{{ packages + [item] }}"
when:
- role == 'corerouter' or role == 'ap'
- not (low_mem | default(false))
- not (low_flash | default(false))
- wifi_roaming | default(false)
loop:
- dawn
- luci-app-dawn
- umdns
- name: "Add tunspace if configured"
set_fact:
packages: "{{ packages + ['tunspace', 'wireguard-tools'] }}"
when:
- networks is defined
- networks | selectattr('role', 'defined') | selectattr('role','equalto','tunnel') | count > 0
- role == 'corerouter'
- name: "Add zram-swap on low mem and big flash"
set_fact:
packages: "{{ packages + ['zram-swap'] }}"
when:
- low_mem | default(false)
- not (low_flash | default(false))
- name: "Add debugging-packages on core-routers"
set_fact:
packages: "{{ packages + ['mosh-server', 'tmux'] }}"
when:
- role == 'corerouter'
- not (low_mem | default(false))
- not (low_flash | default(false))
- name: "Remove or replace packages on low mem and low flash"
set_fact:
packages: "{{ packages + [item] }}"
when: low_mem | default(false) or low_flash | default(false)
loop:
- -ethtool
- -iperf3
- -iwinfo
- -libiwinfo-lua
- -collectd-mod-iwinfo
- -kmod-ipt-core
- -kmod-ipt-offload
- -kmod-nf-ipt
- -kmod-nls-base
- -kmod-phy-ath79-usb
- -kmod-usb-core
- -kmod-usb-ehci
- -kmod-usb-ohci
- -kmod-usb2
- -opkg
- -tcpdump
- tcpdump-mini
- -vnstat
- name: "Remove Luci on low mem and low flash"
set_fact:
packages: "{{ packages + ['-' + item] }}"
when: (low_mem | default(false) or low_flash | default(false)) and role != "corerouter"
loop: "{{ all_luci_base__packages__to_merge }}"
- name: "Disable uhttpd on low mem"
set_fact:
disabled_services: "{{ disabled_services + ['uhttpd'] }}"
when: low_mem | default(false)
- name: "Add ip-bridge if dsa target"
set_fact:
packages: "{{ packages + ['ip-bridge'] }}"
when:
- dsa_ports is defined
- name: "Add poemgr if poemgr target"
set_fact:
packages: "{{ packages + ['poemgr'] }}"
when:
- poemgr_ports is defined