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

Soft reset #197

Closed
wants to merge 3 commits into from
Closed

Soft reset #197

wants to merge 3 commits into from

Conversation

Antagonym
Copy link
Contributor

This is similar to what was suggested in #178.

This adds soft-reset and hard-reset cmd-opts to init-pki subcommand, where hard-reset recursively removes the PKI directory (the current behavior) and soft-reset only removes most of the content, but keeps the directory and the vars file (as well as other user created files) intact.

I decided to implement this as cmd-opts instead of a --option, because from looking at the existing options, it seems like they are more generic or common to a family of subcommands, whereas cmd-opts seem to be specific to a single subcommand (though nopass would be an exception to that rule).

Note that I have made soft-reset the default behavior if no cmd-opt is passed, which is different from the previous behavior and may break scripts relying on this. I did this because I find this the saner option in most use-cases, but this can easily be changed if maintaining previous behavior is deemed more important.

@SloCompTech
Copy link

@Antagonym looks like sign commit is required, could you push signed commit ? Else please contact one of admins to manually merge tihs feature.

@ecrist ecrist added this to the v3.0.9 milestone Apr 15, 2020
@kohlerdominik
Copy link

really waiting for this fix, as it's really necessary for container environments

@TinCanTech TinCanTech self-assigned this Mar 21, 2022
@TinCanTech TinCanTech added the Signature Signature Required label Mar 21, 2022
@TinCanTech TinCanTech removed this from the v3.0.9 milestone Mar 22, 2022
@TinCanTech
Copy link
Collaborator

@Antagonym I'll merge this on the condition that hard be default, current behavior.

You can either simply agree here, or you can submit a further patch.
I leave the choice in your hands.

@TinCanTech TinCanTech added Full-Approval Merge is imminent and removed initial-approval labels Mar 23, 2022
@TinCanTech TinCanTech self-requested a review March 23, 2022 21:25
Copy link
Collaborator

@TinCanTech TinCanTech left a comment

Choose a reason for hiding this comment

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

Please default to hard, current behavior.

@TinCanTech
Copy link
Collaborator

In truth, I'm not sure hard is really required as default because i agree with you. But for the sake of this work, let's merge it with hard, please.

@TinCanTech TinCanTech added this to the v3.1.0 milestone Mar 28, 2022
@TinCanTech TinCanTech added the Priority Acknowledged priority label Mar 29, 2022
TinCanTech referenced this pull request Mar 31, 2022
… Antagonym-soft-reset

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
TinCanTech referenced this pull request Mar 31, 2022
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech
Copy link
Collaborator

Closed via 14a29f9

Default is set to hard

@TinCanTech TinCanTech closed this Mar 31, 2022
TinCanTech added a commit that referenced this pull request Apr 6, 2022
Add:
   * Prefer 'PKI/vars' over all other locations (#528)
   * Introduce 'init-pki soft'  option (#197)

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Possible changes feedback welcome Full-Approval Merge is imminent Priority Acknowledged priority Signature Signature Required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants