Skip to content

Commit

Permalink
Merge pull request #382 from cradle8810/dnsmasq_dns_dup
Browse files Browse the repository at this point in the history
Dnsmasq mai using configuration
  • Loading branch information
cradle8810 authored Nov 17, 2024
2 parents b2ff0c0 + 7311980 commit 782087a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions inventories/host_vars/networks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ subnet:
gw4: 192.168.1.1
dns4:
- 192.168.1.100
- 192.168.1.150
- 202.232.2.3
search:
- hayaworld.home
Expand Down
10 changes: 10 additions & 0 deletions mai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
file: handlers/main.yml

tasks:
- name: Fixed interface name as ens160
ansible.builtin.copy:
src: templates/mai/etc/udev/rules.d/99-nic-ens160.rules
dest: /etc/udev/rules.d/99-nic-ens160.rules
owner: root
group: root
mode: '0644'
tags:
- system

- name: Common Settings
ansible.builtin.import_tasks:
file: tasks/all/main.yml
Expand Down
4 changes: 0 additions & 4 deletions tasks/all/apt_mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@
regexp: 'http://jp.archive.ubuntu.com/ubuntu'
replace: 'http://ftp.iij.ad.jp/pub/linux/ubuntu/archive'
backup: true

- name: "Common / Apt update"
ansible.builtin.apt:
update_cache: true
2 changes: 1 addition & 1 deletion tasks/all/netplan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
network:
version: 2
ethernets:
"{{ hostinfo[0].interface }}":
ens160:
addresses:
- "{{ ipv4_addr }}/{{ subnet.mask }}"
nameservers:
Expand Down
1 change: 1 addition & 0 deletions templates/mai/etc/udev/rules.d/99-nic-ens160.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="b8:27:eb:34:1e:17", NAME="ens160"

0 comments on commit 782087a

Please sign in to comment.