Skip to content

Conversation

milad-zanganeh
Copy link

Pull Request (PR) description
Removing a user previously failed because the elasticsearch::user define always required and passed a password, even when ensure => absent.

This PR fixes the issue by making the password parameter optional and improving the logic for handling user removal.

Related Issue
Fixes #1264

Changes:

  • File: manifests/user.pp
    • Make password an Optional[String].
    • When ensure => absent, declare elasticsearch_user with ensure => absent and do not pass a password.
    • Add validation to enforce that a password must be provided when ensure => present.

@milad-zanganeh milad-zanganeh force-pushed the fix/delete-user branch 3 times, most recently from c6fa4e2 to e07ddf2 Compare September 3, 2025 10:42
@bastelfreak
Copy link
Member

@milad-zanganeh thanks for the PR. Would it be possible that you add a test for this change?

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.

3 participants