Skip to content

Commit

Permalink
feat(tf-cleanup-script): Added script to clean up tf plugin dirs (#1896)
Browse files Browse the repository at this point in the history
Co-authored-by: Edward Malinowski <[email protected]>
  • Loading branch information
emalinowski and Edward Malinowski authored Oct 3, 2022
1 parent 97df638 commit 0815359
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions files/scripts/tf-cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for users in $(cut -d: -f1 /etc/passwd); do
for directory in $(find /home/$users/.local/share/gen3 -name .terraform); do
echo "Removing $directory/plugins" >> /terraformScriptLogs-$(date -u +%Y%m%d))
rm -rf $directory/plugins
done
done

0 comments on commit 0815359

Please sign in to comment.