Skip to content

Commit

Permalink
changelogs:
Browse files Browse the repository at this point in the history
- fix dict.keys() for python3
- fix the document error
  • Loading branch information
zr committed Sep 22, 2018
1 parent 41b14c2 commit d4ffa8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions doc/ref/configuration/minion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -755,26 +755,26 @@ Statically assigns grains to the minion.
.. conf_minion:: grains_blacklist

``grains_blacklist``
----------
--------------------

Default: ``[]``

If :conf_minion:`grains_blacklist` is enabled then any core grains will be
checked against the matches found in the `grains_blacklist` list and any
matched core grains will be filtered.
Each grains key will be compared against each of the expressions in this list.
Any keys which match will be filtered from the grains. Exact matches, glob
matches, and regular expressions are supported.

.. note::
Some states and execution modules depend on grains. Filtering may cause
them to be unavailable or run unreliably.

Some modules may depends on core grains. Filtering may cause
the dependent module to run unusual.

.. versionadded:: 2018.11.0
.. versionadded:: Neon

.. code-block:: yaml
grains_blacklist:
- cpu_flags
- zmq*
- ipv[46]
.. conf_minion:: grains_cache

Expand Down
4 changes: 2 additions & 2 deletions salt/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ def grains(opts, force_refresh=False, proxy=None):
if not isinstance(ret, dict):
continue
if blist:
for key in ret.keys():
for key in list(ret):
for block in blist:
if salt.utils.stringutils.expr_match(key, block):
del ret[key]
Expand Down Expand Up @@ -793,7 +793,7 @@ def grains(opts, force_refresh=False, proxy=None):
if not isinstance(ret, dict):
continue
if blist:
for key in ret.keys():
for key in list(ret):
for block in blist:
if salt.utils.stringutils.expr_match(key, block):
del ret[key]
Expand Down

0 comments on commit d4ffa8f

Please sign in to comment.