Skip to content
Snippets Groups Projects
Commit 693bab32 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

Merge branch 'static-dns' into 'master'

matrix.archlinux.org: Configure static DNS via networking role

See merge request !479
parents 7b68eb35 284ac9c8
No related branches found
No related tags found
1 merge request!479matrix.archlinux.org: Configure static DNS via networking role
Pipeline #10407 passed
---
enable_zram_swap: true
configure_network: true
dhcp: true
---
filesystem: btrfs
static_dns: true
wireguard_address: 10.0.0.15
wireguard_public_key: QWkTL58mJd0+Lz5AvGVmbdSSk29y/W60WUdhTgyGLCk=
[DHCPv4]
UseDNS=false
[DHCPv6]
UseDNS=false
[IPv6AcceptRA]
UseDNS=false
[Network]
DNS=2606:4700:4700::1111#1dot1dot1dot1.cloudflare-dns.com
DNS=2606:4700:4700::1001#1dot1dot1dot1.cloudflare-dns.com
DNS=1.1.1.1#1dot1dot1dot1.cloudflare-dns.com
DNS=1.0.0.1#1dot1dot1dot1.cloudflare-dns.com
DNSOverTLS=true
---
- name: configure network (static)
template: src=10-static-ethernet.network.j2 dest={{ chroot_path }}/etc/systemd/network/10-static-ethernet.network owner=root group=root mode=0644
notify:
- restart networkd
block:
- name: install 10-static-ethernet.network
template: src=10-static-ethernet.network.j2 dest={{ chroot_path }}/etc/systemd/network/10-static-ethernet.network owner=root group=root mode=0644
notify:
- restart networkd
- name: create drop-in directory for 10-static-ethernet.network
file: path=/etc/systemd/network/10-static-ethernet.network.d state=directory owner=root group=root mode=0755
- name: configure static dns (static)
copy: src=dns.conf dest={{ chroot_path }}/etc/systemd/network/10-static-ethernet.network.d/dns.conf owner=root group=root mode=0644
notify:
- restart networkd
when: static_dns|default(true)
when: not dhcp|default(false)
- name: configure network (dhcp)
template: src=10-dhcp-ethernet.network.j2 dest={{ chroot_path }}/etc/systemd/network/10-dhcp-ethernet.network owner=root group=root mode=0644
notify:
- restart networkd
block:
- name: install 10-dhcp-ethernet.network
template: src=10-dhcp-ethernet.network.j2 dest={{ chroot_path }}/etc/systemd/network/10-dhcp-ethernet.network owner=root group=root mode=0644
notify:
- restart networkd
- name: create drop-in directory for 10-dhcp-ethernet.network
file: path=/etc/systemd/network/10-dhcp-ethernet.network.d state=directory owner=root group=root mode=0755
- name: configure static dns (dhcp)
copy: src=dns.conf dest={{ chroot_path }}/etc/systemd/network/10-dhcp-ethernet.network.d/dns.conf owner=root group=root mode=0644
notify:
- restart networkd
when: static_dns|default(false)
when: dhcp|default(false)
- name: create symlink to resolv.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment