Skip to content

Commit

Permalink
fix: ansible truncate machine-id (#774)
Browse files Browse the repository at this point in the history
Fixes the `machine-id` truncate issue introduced in #394.

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
Ryan Johnson authored Nov 15, 2023
1 parent 7e4a7c0 commit 70d4ecf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
7 changes: 3 additions & 4 deletions ansible/roles/clean/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@
# Tasks to clean the machine-id.
- name: "Cleaning the machine-id."
block:
- name: "Resizing the /etc/machine-id."
file:
- name: "Emptying the /etc/machine-id."
community.general.filesize:
path: /etc/machine-id
state: touch
mode: '0000'
size: 0
- name: "Removing /var/lib/dbus/machine-id."
file:
path: /var/lib/dbus/machine-id
Expand Down
7 changes: 3 additions & 4 deletions ansible/roles/clean/tasks/photon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@
# Tasks to clean the machine-id.
- name: "Cleaning the machine-id."
block:
- name: "Resizing the /etc/machine-id."
file:
- name: "Emptying the /etc/machine-id."
community.general.filesize:
path: /etc/machine-id
state: touch
mode: '0000'
size: 0
- name: "Removing /var/lib/dbus/machine-id."
file:
path: /var/lib/dbus/machine-id
Expand Down
8 changes: 3 additions & 5 deletions ansible/roles/clean/tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,17 @@
label: "{{ item.path }}"

# Tasks to clean the machine-id.
- name: "Resizing the /etc/machine-id."
file:
- name: "Emptying the /etc/machine-id."
community.general.filesize:
path: /etc/machine-id
state: touch
mode: '0000'
size: 0

- name: "Cleaning the machine-id."
block:
- name: "Removing /var/lib/dbus/machine-id."
file:
path: /var/lib/dbus/machine-id
state: absent

- name: "Creating a symbolic link to /etc/machine-id."
file:
src: /etc/machine-id
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/clean/tasks/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
label: "{{ item.path }}"

# Tasks to clean the machine-id.
- name: "Resizing the /etc/machine-id."
- name: "Emptying the /etc/machine-id."
community.general.filesize:
path: /etc/machine-id
size: 0B
size: 0

# Tasks to clean the shell history.
- name: "Cleaning the shell history."
Expand Down

0 comments on commit 70d4ecf

Please sign in to comment.