8343-New-machine-id #48

Merged
xavi merged 40 commits from 8343-New-machine-id into main 2025-01-10 13:29:15 +00:00
1 changed files with 22 additions and 0 deletions
Showing only changes of commit aab45431ce - Show all commits

View File

@ -0,0 +1,22 @@
- name: Change machine-id in Debian
hosts: all
gather_facts: no
become: yes
tasks:
- name: Remove files with old machine-id
file:
path: "{{ item }}"
state: absent
loop:
- /etc/machine-id
- /var/lib/dbus/machine-id
- name: Ensure a new UUID is generated for /etc/machine-id
command:
cmd: dbus-uuidgen --ensure=/etc/machine-id
- name: Create symbolic link for /var/lib/dbus/machine-id
file:
src: /etc/machine-id
dest: /var/lib/dbus/machine-id
state: link