ubuntu 24.04

This commit is contained in:
ROTTLER Tamas 2026-01-08 20:29:27 +01:00
parent fb13f7e107
commit 51c273eb8d

View File

@ -69,7 +69,7 @@
content: "" content: ""
dest: /etc/resolv.conf dest: /etc/resolv.conf
tags: dns tags: dns
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
- name: set hostname - name: set hostname
command: "hostname {{ hostname }}" command: "hostname {{ hostname }}"
@ -83,13 +83,13 @@
file: file:
path: /etc/network path: /etc/network
state: directory state: directory
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
- name: new /etc/network/interfaces - name: new /etc/network/interfaces
template: template:
src: interfaces.t src: interfaces.t
dest: /etc/network/interfaces dest: /etc/network/interfaces
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
- name: new /etc/resolv.conf - name: new /etc/resolv.conf
template: template:
@ -107,22 +107,23 @@
template: template:
src: hosts.t src: hosts.t
dest: /etc/hosts dest: /etc/hosts
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
tags: dns tags: dns
- name: new /etc/resolv.conf - name: new /etc/resolv.conf
template: template:
src: resolv.conf.t src: resolv.conf.t
dest: /etc/resolv.conf dest: /etc/resolv.conf
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
tags: dns tags: dns
- name: remove ssh host keys - name: remove ssh host keys
shell: "rm /etc/ssh/ssh_host*key*" shell: "rm /etc/ssh/ssh_host*key*"
failed_when: no
- name: create new ssh host keys - name: create new ssh host keys
command: "dpkg-reconfigure openssh-server" command: "dpkg-reconfigure openssh-server"
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
- name: create new ssh host keys - name: create new ssh host keys
systemd_service: systemd_service: