When a postgres cluster is to be removed, the user doesn't know if it's running or not. Mostly, the cluster will be running. So stop it by default.

If that is not desired behavior, then an option to stop it needs to be added, because otherwise a running cluster can never be removed.
This commit is contained in:
Anita Krueger 2015-11-18 00:12:54 +00:00
parent 4cb07cf997
commit 52d3b1baac

View File

@ -121,7 +121,7 @@ def absent(version,
msg = 'Cluster {0}/{1} is set to be removed'
ret['comment'] = msg.format(version, name)
return ret
if __salt__['postgres.cluster_remove'](version, name):
if __salt__['postgres.cluster_remove'](version, name, True):
msg = 'Cluster {0}/{1} has been removed'
ret['comment'] = msg.format(version, name)
ret['changes'][name] = 'Absent'