2022-11-20 20:03:01 -06:00
|
|
|
---
|
2022-01-25 23:54:43 -06:00
|
|
|
|
|
|
|
- name: ArchLinux network packages
|
|
|
|
become: yes
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- netctl
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Static ArchLinux network config
|
|
|
|
become: yes
|
2023-05-02 17:32:11 -05:00
|
|
|
when: static is defined and not tap is defined
|
2022-01-25 23:54:43 -06:00
|
|
|
template:
|
|
|
|
src: netctl-static.j2
|
|
|
|
dest: "/etc/netctl/{{ ipinterface }}"
|
|
|
|
|
2022-05-25 14:50:16 -05:00
|
|
|
- name: Tap ArchLinux network config
|
|
|
|
become: yes
|
2024-04-01 00:44:23 -05:00
|
|
|
when: tap is defined
|
2022-05-25 14:50:16 -05:00
|
|
|
template:
|
2023-12-07 13:28:54 -06:00
|
|
|
src: netctl-tap.j2
|
2022-05-25 14:50:16 -05:00
|
|
|
dest: "/etc/netctl/{{ ipinterface }}"
|
|
|
|
|
2022-12-18 22:24:44 -06:00
|
|
|
- name: Bridge ArchLinux network config
|
|
|
|
become: yes
|
2024-04-01 00:44:23 -05:00
|
|
|
when: tap is defined
|
2022-12-18 22:24:44 -06:00
|
|
|
template:
|
|
|
|
src: netctl-bond.j2
|
|
|
|
dest: "/etc/netctl/br0"
|
|
|
|
|
|
|
|
- name: Tunnel ArchLinux network config
|
|
|
|
become: yes
|
2024-04-01 00:44:23 -05:00
|
|
|
when: tap is defined
|
2022-12-18 22:24:44 -06:00
|
|
|
copy:
|
|
|
|
src: netctl-tun
|
|
|
|
dest: "/etc/netctl/tun0"
|
|
|
|
|
2022-01-25 23:54:43 -06:00
|
|
|
- name: Dynamic ArchLinux network config
|
|
|
|
become: yes
|
2023-05-02 17:32:11 -05:00
|
|
|
when: not static is defined and not tap is defined
|
2022-01-25 23:54:43 -06:00
|
|
|
template:
|
|
|
|
src: netctl-dhcp.j2
|
|
|
|
dest: "/etc/netctl/{{ ipinterface }}"
|
|
|
|
|
|
|
|
- name: Enable network config
|
|
|
|
become: yes
|
2022-11-20 20:03:01 -06:00
|
|
|
command: "netctl enable {{ ipinterface }}"
|