diff --git a/conf/master b/conf/master index 55e1983ba87..7bc9e34c0ef 100644 --- a/conf/master +++ b/conf/master @@ -670,6 +670,11 @@ CLI option, only sets this to a single file for all salt commands. # Recursively merge lists by aggregating them instead of replacing them. #pillar_merge_lists: False +# Set this option to 'True' to force a 'KeyError' to be raised whenever an +# attempt to retrieve a named value from pillar fails. When this option is set +# to 'False', the failed attempt returns an empty string. Default is 'False'. +#pillar_raise_on_missing: False + # Git External Pillar (git_pillar) Configuration Options # # Specify the provider to be used for git_pillar. Must be either pygit2 or diff --git a/conf/minion b/conf/minion index 72d8b70e4cd..e853cfe9b9f 100644 --- a/conf/minion +++ b/conf/minion @@ -418,6 +418,11 @@ # as the environment setting, but for pillar instead of states. #pillarenv: None # +# Set this option to 'True' to force a 'KeyError' to be raised whenever an +# attempt to retrieve a named value from pillar fails. When this option is set +# to 'False', the failed attempt returns an empty string. Default is 'False'. +#pillar_raise_on_missing: False +# # If using the local file directory, then the state top file name needs to be # defined, by default this is top.sls. #state_top: top.sls diff --git a/doc/ref/configuration/master.rst b/doc/ref/configuration/master.rst index d49156ae4a2..d428fc32679 100644 --- a/doc/ref/configuration/master.rst +++ b/doc/ref/configuration/master.rst @@ -2295,6 +2295,19 @@ ext_pillar. ext_pillar_first: False +.. conf_master:: pillar_raise_on_missing + +``pillar_raise_on_missing`` +--------------------------- + +.. versionadded:: 2015.5.0 + +Default: ``False`` + +Set this option to ``True`` to force a ``KeyError`` to be raised whenever an +attempt to retrieve a named value from pillar fails. When this option is set +to ``False``, the failed attempt returns an empty string. + .. _git-pillar-config-opts: Git External Pillar (git_pillar) Configuration Options diff --git a/doc/ref/configuration/minion.rst b/doc/ref/configuration/minion.rst index b45ea696ac3..54c10a58ed5 100644 --- a/doc/ref/configuration/minion.rst +++ b/doc/ref/configuration/minion.rst @@ -1271,6 +1271,19 @@ the environment setting, but for pillar instead of states. pillarenv: None +.. conf_minion:: pillar_raise_on_missing + +``pillar_raise_on_missing`` +--------------------------- + +.. versionadded:: 2015.5.0 + +Default: ``False`` + +Set this option to ``True`` to force a ``KeyError`` to be raised whenever an +attempt to retrieve a named value from pillar fails. When this option is set +to ``False``, the failed attempt returns an empty string. + .. conf_minion:: file_recv_max_size ``file_recv_max_size``