Kapisi/roles/ShadowArch/tasks/archlinux-network.yml

34 lines
756 B
YAML
Raw Normal View History

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
when: static and not tap
2022-01-25 23:54:43 -06:00
template:
src: netctl-static.j2
dest: "/etc/netctl/{{ ipinterface }}"
- name: Tap ArchLinux network config
become: yes
when: tap and not static
template:
src: netctl-tap.j2
dest: "/etc/netctl/{{ ipinterface }}"
2022-01-25 23:54:43 -06:00
- name: Dynamic ArchLinux network config
become: yes
when: not static and not tap
2022-01-25 23:54:43 -06:00
template:
src: netctl-dhcp.j2
dest: "/etc/netctl/{{ ipinterface }}"
- name: Enable network config
become: yes
command: "netctl enable {{ ipinterface }}"