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

Clarify the remove keystore command can handle many #54244

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

package org.elasticsearch.common.settings;

import java.util.List;

import joptsimple.OptionSet;
import joptsimple.OptionSpec;
import org.elasticsearch.cli.ExitCodes;
import org.elasticsearch.cli.Terminal;
import org.elasticsearch.cli.UserException;
import org.elasticsearch.env.Environment;

import java.util.List;

/**
* A subcommand for the keystore cli to remove a setting.
*/
Expand All @@ -36,7 +36,7 @@ class RemoveSettingKeyStoreCommand extends BaseKeyStoreCommand {
private final OptionSpec<String> arguments;

RemoveSettingKeyStoreCommand() {
super("Remove a setting from the keystore", true);
super("Remove settings from the keystore", true);
arguments = parser.nonOptions("setting names");
}

Expand Down
11 changes: 10 additions & 1 deletion docs/reference/commands/keystore.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ can optionally use an empty string to remove the password. If the keystore is
not password protected, you can use this command to set a password.

`remove <settings>`:: Removes settings from the keystore. Multiple setting
names can be specified as arguments to the `add` command.
names can be specified as arguments to the `remove` command.

`-s, --silent`:: Shows minimal output.

Expand Down Expand Up @@ -195,6 +195,15 @@ To remove a setting from the keystore, use the `remove` command:
bin/elasticsearch-keystore remove the.setting.name.to.remove
----------------------------------------------------------------

You can also remove multiple settings with the `remove` command:

[source,sh]
----------------------------------------------------------------
bin/elasticsearch-keystore remove \
the.setting.name.to.remove \
the.other.setting.name.to.remove
----------------------------------------------------------------

If the {es} keystore is password protected, you are prompted to enter the
password.

Expand Down