mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
FreeIPA: new module ipa_config (#42279)
* Adds new ipa_config module * Modify _post_json to handle config_show/config_mod * Doc: Add periods * More documentation * Added aliases
This commit is contained in:
committed by
ansibot
parent
2177d37d5a
commit
27a3a90fc8
@@ -97,10 +97,14 @@ class IPAClient(object):
|
||||
item = {}
|
||||
url = '%s/session/json' % self.get_base_url()
|
||||
data = dict(method=method)
|
||||
if method != 'ping':
|
||||
data['params'] = [[name], item]
|
||||
else:
|
||||
|
||||
# TODO: We should probably handle this a little better.
|
||||
if method in ('ping', 'config_show'):
|
||||
data['params'] = [[], {}]
|
||||
elif method == 'config_mod':
|
||||
data['params'] = [[], item]
|
||||
else:
|
||||
data['params'] = [[name], item]
|
||||
|
||||
try:
|
||||
resp, info = fetch_url(module=self.module, url=url, data=to_bytes(json.dumps(data)), headers=self.headers)
|
||||
|
||||
Reference in New Issue
Block a user