From d3dae4a4448975102c48fd6af2260abd2e9fd0a6 Mon Sep 17 00:00:00 2001
From: Andrey Klychkov <aaklychkov@mail.ru>
Date: Wed, 10 Apr 2019 16:54:27 +0300
Subject: [PATCH] postgresql_owner: fix doc (#55091)

* postgresql_owner: fix doc

* postgresql_owner: fix doc

* postgresql_owner: fix doc
---
 .../postgresql/postgresql_membership.py       | 20 +++++--------------
 .../database/postgresql/postgresql_owner.py   | 13 +++---------
 .../database/postgresql/postgresql_slot.py    |  2 +-
 3 files changed, 9 insertions(+), 26 deletions(-)

diff --git a/lib/ansible/modules/database/postgresql/postgresql_membership.py b/lib/ansible/modules/database/postgresql/postgresql_membership.py
index 36d9c2eb0fb..cb54e5225e6 100644
--- a/lib/ansible/modules/database/postgresql/postgresql_membership.py
+++ b/lib/ansible/modules/database/postgresql/postgresql_membership.py
@@ -108,18 +108,11 @@ options:
     type: str
     default: prefer
     choices: [ allow, disable, prefer, require, verify-ca, verify-full ]
-  ssl_rootcert:
-    description:
-    - Specifies the name of a file containing SSL certificate authority (CA)
-      certificate(s).
-    - If the file exists, the server's certificate will be
-      verified to be signed by one of these authorities.
-    type: str
   ca_cert:
     description:
-      - Specifies the name of a file containing SSL certificate authority (CA)
-        certificate(s). If the file exists, the server's certificate will be
-        verified to be signed by one of these authorities.
+      - Specifies the name of a file containing SSL certificate authority (CA) certificate(s).
+      - If the file exists, the server's certificate will be verified to be signed by one of these authorities.
+    type: str
     aliases: [ ssl_rootcert ]
 notes:
 - The default authentication assumes that you are either logging in as or
@@ -353,9 +346,6 @@ def main():
         fail_on_role=dict(type='bool', default=True),
         state=dict(type='str', default='present', choices=['absent', 'present']),
         db=dict(type='str', aliases=['login_db']),
-        port=dict(type='int', default=5432, aliases=['login_port']),
-        ssl_mode=dict(type='str', default='prefer', choices=['allow', 'disable', 'prefer', 'require', 'verify-ca', 'verify-full']),
-        ssl_rootcert=dict(type='str'),
         session_role=dict(type='str'),
     )
 
@@ -371,7 +361,7 @@ def main():
     target_roles = module.params['target_roles']
     fail_on_role = module.params['fail_on_role']
     state = module.params['state']
-    sslrootcert = module.params['ssl_rootcert']
+    sslrootcert = module.params['ca_cert']
     session_role = module.params['session_role']
 
     # To use defaults values, keyword arguments must be absent, so
@@ -384,7 +374,7 @@ def main():
         "port": "port",
         "db": "database",
         "ssl_mode": "sslmode",
-        "ssl_rootcert": "sslrootcert"
+        "ca_cert": "sslrootcert"
     }
     kw = dict((params_map[k], v) for (k, v) in iteritems(module.params)
               if k in params_map and v != '' and v is not None)
diff --git a/lib/ansible/modules/database/postgresql/postgresql_owner.py b/lib/ansible/modules/database/postgresql/postgresql_owner.py
index f81274fac6c..cbc8d5fe9c3 100644
--- a/lib/ansible/modules/database/postgresql/postgresql_owner.py
+++ b/lib/ansible/modules/database/postgresql/postgresql_owner.py
@@ -108,18 +108,11 @@ options:
     type: str
     default: prefer
     choices: [ allow, disable, prefer, require, verify-ca, verify-full ]
-  ssl_rootcert:
-    description:
-    - Specifies the name of a file containing SSL certificate authority (CA)
-      certificate(s).
-    - If the file exists, the server's certificate will be
-      verified to be signed by one of these authorities.
-    type: str
   ca_cert:
     description:
-      - Specifies the name of a file containing SSL certificate authority (CA)
-        certificate(s). If the file exists, the server's certificate will be
-        verified to be signed by one of these authorities.
+      - Specifies the name of a file containing SSL certificate authority (CA) certificate(s).
+      - If the file exists, the server's certificate will be verified to be signed by one of these authorities.
+    type: str
     aliases: [ ssl_rootcert ]
 
 notes:
diff --git a/lib/ansible/modules/database/postgresql/postgresql_slot.py b/lib/ansible/modules/database/postgresql/postgresql_slot.py
index 456713d461a..ec306991c56 100644
--- a/lib/ansible/modules/database/postgresql/postgresql_slot.py
+++ b/lib/ansible/modules/database/postgresql/postgresql_slot.py
@@ -340,7 +340,7 @@ def main():
         "login_password": "password",
         "port": "port",
         "sslmode": "ssl_mode",
-        "ssl_rootcert": "ssl_rootcert"
+        "ca_cert": "ssl_rootcert"
     }
     kw = dict((params_map[k], v) for (k, v) in module.params.items()
               if k in params_map and v != '')