From 2a6167de1175e1a09a1aabd8df3ebb6d59e2465f Mon Sep 17 00:00:00 2001 From: Hayato Date: Mon, 18 Nov 2024 00:19:25 +0900 Subject: [PATCH 1/4] Add mai for dns --- inventories/host_vars/networks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/inventories/host_vars/networks.yml b/inventories/host_vars/networks.yml index 13638cb..df64c3c 100644 --- a/inventories/host_vars/networks.yml +++ b/inventories/host_vars/networks.yml @@ -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 From e893e62b8a70b83bb5809d42e10609f52f7dfbf1 Mon Sep 17 00:00:00 2001 From: Hayato Date: Mon, 18 Nov 2024 00:26:12 +0900 Subject: [PATCH 2/4] Fixed ens160 for interface name --- tasks/all/netplan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/all/netplan.yml b/tasks/all/netplan.yml index 85e53fd..0344b62 100644 --- a/tasks/all/netplan.yml +++ b/tasks/all/netplan.yml @@ -12,7 +12,7 @@ network: version: 2 ethernets: - "{{ hostinfo[0].interface }}": + ens160: addresses: - "{{ ipv4_addr }}/{{ subnet.mask }}" nameservers: From c9af3bf31ddbacbbe2bb0c728d25f5d90194bd8c Mon Sep 17 00:00:00 2001 From: Hayato Date: Mon, 18 Nov 2024 00:26:31 +0900 Subject: [PATCH 3/4] Fixed interface name as ens160 for mai --- mai.yml | 10 ++++++++++ templates/mai/etc/udev/rules.d/99-nic-ens160.rules | 1 + 2 files changed, 11 insertions(+) create mode 100644 templates/mai/etc/udev/rules.d/99-nic-ens160.rules diff --git a/mai.yml b/mai.yml index 2c39394..e18c98b 100644 --- a/mai.yml +++ b/mai.yml @@ -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 diff --git a/templates/mai/etc/udev/rules.d/99-nic-ens160.rules b/templates/mai/etc/udev/rules.d/99-nic-ens160.rules new file mode 100644 index 0000000..8b923f5 --- /dev/null +++ b/templates/mai/etc/udev/rules.d/99-nic-ens160.rules @@ -0,0 +1 @@ +SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="b8:27:eb:34:1e:17", NAME="ens160" From 731198058f699999d2a0b833e0a397a91252a8ed Mon Sep 17 00:00:00 2001 From: Hayato Date: Mon, 18 Nov 2024 00:45:06 +0900 Subject: [PATCH 4/4] Remove useless apt update --- tasks/all/apt_mirror.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tasks/all/apt_mirror.yml b/tasks/all/apt_mirror.yml index babefa6..842a0d1 100644 --- a/tasks/all/apt_mirror.yml +++ b/tasks/all/apt_mirror.yml @@ -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