From f46722aaeb3f914a8825ea7f676bbe686e2ae696 Mon Sep 17 00:00:00 2001 From: Bruno Binet Date: Thu, 13 Aug 2015 18:22:21 +0200 Subject: [PATCH] allow to delete grains which value is False --- salt/states/grains.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/salt/states/grains.py b/salt/states/grains.py index 76a07685a5..4ee6851a46 100644 --- a/salt/states/grains.py +++ b/salt/states/grains.py @@ -220,8 +220,7 @@ def absent(name, destructive=False): 'changes': {}, 'result': True, 'comment': ''} - grain = __grains__.get(name) - if grain: + if name in __grains__: if __opts__['test']: ret['result'] = None if destructive is True: