fix rabbitmq_vhost.present result when test=True

This commit is contained in:
Andreas Lutro 2016-02-06 12:51:00 +01:00
parent 21a83065aa
commit aba29a73c4

View file

@ -71,10 +71,11 @@ def present(name):
vhost_exists = __salt__['rabbitmq.vhost_exists'](name)
if __opts__['test']:
ret['result'] = None
if vhost_exists:
ret['result'] = True
ret['comment'] = 'VHost {0} already exists'.format(name)
else:
ret['result'] = None
ret['comment'] = 'Creating VHost {0}'.format(name)
else: