Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1108

pdk config set to CLI



    • Task
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PDK 1.18.0
    • None
    • New Feature
    • Add `pdk config set` option to set, update or add to the value(s) in a given configuration key.
    • Needs Assessment


      pdk config set [--add] <key> <value>

      Sets, updates, or adds to the value(s) in the given configuration key and outputs the new value(s).

      If <key> is not a leaf node, exits non-zero with an error message.

      If <key> already has a value set, issues a notice before replacing existing value.

      If <key> is designed to store multiple values (e.g. a list):

      If the current value list is empty, set the first value in the list to the provided <value>.

      If the current value list is not empty and <value> is not already present in the list, add <value> to the list.

      If <value> is already present in the value list, issues a notice that value was already on list, outputs the current values of <key>, and exits with a success status.

      If <key> is a user-defined configuration key where we cannot infer whether or not it can have multiple values, assume it is a single-value key unless the user includes the --add flag. If the user includes the --add flag, treat it as a multi-value key as described above.




            glenn.sarti Glenn Sarti
            bryan.jen Bryan Jen
            0 Vote for this issue
            1 Start watching this issue



              Zendesk Support