Refs #8343: New-machine-id - Initial approach

This commit is contained in:
Xavi Lleó 2025-01-09 10:31:34 +01:00
parent 82b96bcd54
commit aab45431ce
1 changed files with 22 additions and 0 deletions

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