From 6b68e09a8adbf1f228e28ee03fd0ba761cae3d2c Mon Sep 17 00:00:00 2001 From: Dan Guido Date: Sun, 17 Aug 2025 15:34:55 -0400 Subject: [PATCH] Fix 'history: not found' error in privacy role MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'history -c' command was failing because history is a bash built-in that doesn't exist in /bin/sh (Ubuntu's default shell for scripts). Changes: - Removed the 'Clear current session history' task since it's ineffective in Ansible context (each task runs in a new shell) - History files are already cleared by the existing file removal tasks - Added explanatory comment about why session history clearing is omitted This fixes the deployment failure while maintaining all effective history clearing functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- roles/privacy/tasks/clear_history.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/privacy/tasks/clear_history.yml b/roles/privacy/tasks/clear_history.yml index 35cc9211..a72604fe 100644 --- a/roles/privacy/tasks/clear_history.yml +++ b/roles/privacy/tasks/clear_history.yml @@ -55,7 +55,5 @@ group: root when: privacy_history_clearing.clear_bash_history | bool -- name: Clear current session history - shell: history -c - changed_when: false - when: privacy_history_clearing.clear_bash_history | bool +# Note: We don't clear current session history as each Ansible task +# runs in its own shell session, making this operation ineffective