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 ---
- name: "[Alpine] Install package: vlan"
apk:
name: vlan
state: present
update_cache: yes
when:
- network.vlanSupport is defined
- network.vlanSupport is true
- name: "[Alpine] Install package: bridge"
apk:
name: bridge
state: present
update_cache: yes
when:
- network.bridgeSupport is defined
- network.bridgeSupport is true
- name: "[Alpine] Remove package: vlan"
apk:
name: vlan
state: absent
update_cache: yes
when:
- network.vlanSupport is defined
- network.vlanSupport is false
- name: "[Alpine] Remove package: bridge"
apk:
name: bridge
state: absent
update_cache: yes
when:
- network.bridgeSupport is defined
- network.bridgeSupport is false
- name: "[Alpine] Create file: /etc/network/interfaces"
template:
src: interfaces.conf.j2
dest: /etc/network/interfaces
mode: 0755
when: network.interfaces is defined
notify: "Restart networking"