From 4bbb5878b0c563c138c4ea5a902892e18975a720 Mon Sep 17 00:00:00 2001 From: Sebastiaan Mannem Date: Mon, 19 Oct 2020 15:12:51 +0200 Subject: [PATCH] Update postgresql_pg_hba.py Fixes #1108 --- plugins/modules/database/postgresql/postgresql_pg_hba.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/database/postgresql/postgresql_pg_hba.py b/plugins/modules/database/postgresql/postgresql_pg_hba.py index e8f52c1c44c..1f484bcfeab 100644 --- a/plugins/modules/database/postgresql/postgresql_pg_hba.py +++ b/plugins/modules/database/postgresql/postgresql_pg_hba.py @@ -335,7 +335,7 @@ def add_rule(self, rule): ekeys = set(list(oldrule.keys()) + list(rule.keys())) ekeys.remove('line') for k in ekeys: - if oldrule[k] != rule[k]: + if oldrule.get(k) != rule.get(k): raise PgHbaRuleChanged('{0} changes {1}'.format(rule, oldrule)) except PgHbaRuleChanged: self.rules[key] = rule