diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index b34506dcd..7cde17e9f 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -170,6 +170,16 @@ _certificate_revocation_list_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _config_arguments +_config_arguments=( + "print:Examine Puppet's current settings" + "set:Set Puppet's settings" + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--section:SECTION_NAME The section of the configuration file to interact with' +) + __task_list () { local expl @@ -299,6 +309,23 @@ __puppet-certificate_revocation_list () esac } +__puppet-config () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _config_arguments + return + ;; + esac +} + local expl @@ -358,6 +385,11 @@ case $state in (certificate_revocation_list) __puppet-certificate_revocation_list ;; + + # Display sub-commands for puppet config. + (config) + __puppet-config + ;; esac ;; esac