mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Make docker.absent honor test=true
This commit is contained in:
parent
92dc7936ca
commit
5598cb4a21
@ -2056,6 +2056,11 @@ def absent(name, force=False):
|
|||||||
'forcibly remove it')
|
'forcibly remove it')
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
if __opts__['test']:
|
||||||
|
ret['result'] = None
|
||||||
|
ret['comment'] = ('Container \'{0}\' will be removed'.format(name))
|
||||||
|
return ret
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ret['changes']['removed'] = __salt__['dockerng.rm'](name, force=force)
|
ret['changes']['removed'] = __salt__['dockerng.rm'](name, force=force)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
Loading…
Reference in New Issue
Block a user