Skip to content

[RELOPS-2269] Skip people remover script when no listed users exist#1108

Open
rcurranmoz wants to merge 5 commits intomasterfrom
people-remover-puppet-idempotency
Open

[RELOPS-2269] Skip people remover script when no listed users exist#1108
rcurranmoz wants to merge 5 commits intomasterfrom
people-remover-puppet-idempotency

Conversation

@rcurranmoz
Copy link
Copy Markdown
Contributor

Add an unless guard that checks for each user's home directory — exits 0 (skip exec) when none are present, exits 1 (run exec) if any remain. This avoids running the script on every puppet apply once cleanup is done.

rcurranmoz and others added 3 commits March 16, 2026 12:53
Add an unless guard that checks for each user's home directory — exits 0
(skip exec) when none are present, exits 1 (run exec) if any remain.
This avoids running the script on every puppet apply once cleanup is done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rcurranmoz rcurranmoz changed the title Skip people remover script when no listed users exist [RELOPS-2269] Skip people remover script when no listed users exist Mar 24, 2026
Use path + sh -c so Puppet can find the shell and execute the for builtin
in the unless check without a 'not qualified' error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rcurranmoz rcurranmoz requested a review from a team March 24, 2026 16:20
Copy link
Copy Markdown
Member

@aerickson aerickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have the names of users to purge in a variable. The cleanup script must have the names, maybe we should just move the logic into the remover script.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants