- add_command_under_category(string, string, string, int, ruby_block)
- add_command(string, string, int, ruby_block)
gitlab-ctl commands can be added to two directory :
files/gitlab-ctl-commands-ee. Chef stores
gitlab-ctl commands in
There are two main functions you will use to add commands (https://github.com/chef/omnibus-ctl):
This method will add a new command to your ctl under a category, useful for grouping similar commands together logically in help output.
- Name of the command.
- Category of the command. It should be string consisting of only characters and “-“. If the category does not exist, it will be added. Default categories are “general” and “service-management” (if the latter is enabled).
- Description. This will be outputted below the command name when the help command is run.
- Ruby block. Ruby code to be executed when your command is run (arguments to that command will be passed into the block).
This method will add a new command to your ctl without a category. It will be displayed above all categories when the help command is called.
Input arguments are the same as
add_command_under_category except 2 doesn’t exist.