Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add possibility to check a decrypted value, before setting a password… #136

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

schneewe
Copy link
Contributor

@schneewe schneewe commented Oct 8, 2022

I added a new task to check and validate a current encrypted value, so wee only set a password value only if they don't match. This results in lesser restarts, because the value is actually not changing. Otherwise in my current runs, the encrypted value gets overwritten, the task results in "changed" and splunk need a restart.

As an example I changed the workflow for the configure_deploymentclient.yml task.

@schneewe
Copy link
Contributor Author

Is this something to be helping or considering to implement?

@dtwersky
Copy link
Collaborator

Just to make sure I understand this. This will prevent ansible from changing the encrypted pass4SymmKey every time it runs, or change it if it does not match the value of splunk_ds_key?

I like it being in a separate task, so it can be re-used for other encrypted values.

How have you tested this?

@dtwersky dtwersky self-assigned this Nov 22, 2022
@dtwersky dtwersky added the enhancement New feature or request label Nov 22, 2022
@schneewe
Copy link
Contributor Author

I already used it for one of my customers and at my company lab, because we wanted to optimize the workflow and reduce service restarts, due to no change of the pass4SymmKeys.
Actually it's pretty easy, the encrypted value gets decrypted with the splunk.secret and compared to the ansible variable.

I tested it with a running deployment, one time without any change, so nothing will happen and the playbook runs straight through to the end. if you change as an example the key for the deploymentserver pass4SymmKey then splunk restarts, as the file itself changed.

@jewnix jewnix self-requested a review November 23, 2022 22:06
@jewnix jewnix requested a review from dtwersky March 31, 2023 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants