From 52d3b1baacaecd5d4b819d881dffc1fb177c6705 Mon Sep 17 00:00:00 2001 From: Anita Krueger Date: Wed, 18 Nov 2015 00:12:54 +0000 Subject: [PATCH] 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. --- salt/states/postgres_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/postgres_cluster.py b/salt/states/postgres_cluster.py index f08d68bd18..17c05da942 100644 --- a/salt/states/postgres_cluster.py +++ b/salt/states/postgres_cluster.py @@ -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'