From 374872cac4f148eb41f76dbbb0fb1f3b76172ed5 Mon Sep 17 00:00:00 2001 From: Steve Jacobs Date: Wed, 30 Aug 2017 13:36:42 -0600 Subject: [PATCH] ipa modules never updated to use 'name' attributes such as cn, uid, fqdn. This fixes. (#25851) --- lib/ansible/modules/identity/ipa/ipa_group.py | 2 +- lib/ansible/modules/identity/ipa/ipa_hbacrule.py | 2 +- lib/ansible/modules/identity/ipa/ipa_host.py | 2 +- lib/ansible/modules/identity/ipa/ipa_hostgroup.py | 2 +- lib/ansible/modules/identity/ipa/ipa_role.py | 2 +- lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py | 2 +- lib/ansible/modules/identity/ipa/ipa_sudorule.py | 2 +- lib/ansible/modules/identity/ipa/ipa_user.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/identity/ipa/ipa_group.py b/lib/ansible/modules/identity/ipa/ipa_group.py index 2a9e7af973..6d1b65cf7f 100644 --- a/lib/ansible/modules/identity/ipa/ipa_group.py +++ b/lib/ansible/modules/identity/ipa/ipa_group.py @@ -203,7 +203,7 @@ def get_group_diff(client, ipa_group, module_group): def ensure(module, client): state = module.params['state'] - name = module.params['name'] + name = module.params['cn'] group = module.params['group'] user = module.params['user'] diff --git a/lib/ansible/modules/identity/ipa/ipa_hbacrule.py b/lib/ansible/modules/identity/ipa/ipa_hbacrule.py index 0ac845697c..f4c97687cc 100644 --- a/lib/ansible/modules/identity/ipa/ipa_hbacrule.py +++ b/lib/ansible/modules/identity/ipa/ipa_hbacrule.py @@ -234,7 +234,7 @@ def get_hbcarule_diff(client, ipa_hbcarule, module_hbcarule): def ensure(module, client): - name = module.params['name'] + name = module.params['cn'] state = module.params['state'] if state in ['present', 'enabled']: diff --git a/lib/ansible/modules/identity/ipa/ipa_host.py b/lib/ansible/modules/identity/ipa/ipa_host.py index daa0c46c8e..dbf92f2841 100644 --- a/lib/ansible/modules/identity/ipa/ipa_host.py +++ b/lib/ansible/modules/identity/ipa/ipa_host.py @@ -215,7 +215,7 @@ def get_host_diff(client, ipa_host, module_host): def ensure(module, client): - name = module.params['name'] + name = module.params['fqdn'] state = module.params['state'] ipa_host = client.host_find(name=name) diff --git a/lib/ansible/modules/identity/ipa/ipa_hostgroup.py b/lib/ansible/modules/identity/ipa/ipa_hostgroup.py index 286dd0c526..7fca88cf0d 100644 --- a/lib/ansible/modules/identity/ipa/ipa_hostgroup.py +++ b/lib/ansible/modules/identity/ipa/ipa_hostgroup.py @@ -163,7 +163,7 @@ def get_hostgroup_diff(client, ipa_hostgroup, module_hostgroup): def ensure(module, client): - name = module.params['name'] + name = module.params['cn'] state = module.params['state'] host = module.params['host'] hostgroup = module.params['hostgroup'] diff --git a/lib/ansible/modules/identity/ipa/ipa_role.py b/lib/ansible/modules/identity/ipa/ipa_role.py index bfbb43c81e..820749cfec 100644 --- a/lib/ansible/modules/identity/ipa/ipa_role.py +++ b/lib/ansible/modules/identity/ipa/ipa_role.py @@ -230,7 +230,7 @@ def get_role_diff(client, ipa_role, module_role): def ensure(module, client): state = module.params['state'] - name = module.params['name'] + name = module.params['cn'] group = module.params['group'] host = module.params['host'] hostgroup = module.params['hostgroup'] diff --git a/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py b/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py index 9a5769ef62..ac05c162c4 100644 --- a/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py +++ b/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py @@ -143,7 +143,7 @@ def get_sudocmdgroup_diff(client, ipa_sudocmdgroup, module_sudocmdgroup): def ensure(module, client): - name = module.params['name'] + name = module.params['cn'] state = module.params['state'] sudocmd = module.params['sudocmd'] diff --git a/lib/ansible/modules/identity/ipa/ipa_sudorule.py b/lib/ansible/modules/identity/ipa/ipa_sudorule.py index 05a6c9f01f..4b91f1b946 100644 --- a/lib/ansible/modules/identity/ipa/ipa_sudorule.py +++ b/lib/ansible/modules/identity/ipa/ipa_sudorule.py @@ -251,7 +251,7 @@ def category_changed(module, client, category_name, ipa_sudorule): def ensure(module, client): state = module.params['state'] - name = module.params['name'] + name = module.params['cn'] cmd = module.params['cmd'] cmdcategory = module.params['cmdcategory'] host = module.params['host'] diff --git a/lib/ansible/modules/identity/ipa/ipa_user.py b/lib/ansible/modules/identity/ipa/ipa_user.py index 03ea508a86..9278eab7a2 100644 --- a/lib/ansible/modules/identity/ipa/ipa_user.py +++ b/lib/ansible/modules/identity/ipa/ipa_user.py @@ -244,7 +244,7 @@ def get_ssh_key_fingerprint(ssh_key): def ensure(module, client): state = module.params['state'] - name = module.params['name'] + name = module.params['uid'] nsaccountlock = state == 'disabled' module_user = get_user_dict(displayname=module.params.get('displayname'),