Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please add ipa 'domain resolution order' option to the ipa_config module #55879

Closed
RobVerduijn opened this issue Apr 29, 2019 · 9 comments
Closed
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bot_closed collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. identity Identity category ipa IPA community module This issue/PR relates to a module. needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md support:community This issue/PR relates to code supported by the Ansible community.

Comments

@RobVerduijn
Copy link

SUMMARY

please add the option to set the ipa 'domain resolution order' to ipa_config

ISSUE TYPE
  • Feature Idea
    The current ipa_config module does not have an option to set the domain resolution order in the ipa global config.

Please add this option to the ipa_config module

COMPONENT NAME

ipa_config

ADDITIONAL INFORMATION

This patch should do the trick

--- a/lib/ansible/modules/identity/ipa/ipa_config.py
+++ b/lib/ansible/modules/identity/ipa/ipa_config.py
@@ -25,6 +25,8 @@ options:
   ipadefaultemaildomain:
     description: Default e-mail domain for new users.
     aliases: ["emaildomain"]
+  ipadomainresolutionorder:
+    description: colon-separated list of domains used for short name qualification
 extends_documentation_fragment: ipa.documentation
 version_added: "2.7"
 '''
@@ -70,12 +72,15 @@ class ConfigIPAClient(IPAClient):
         return self._post_json(method='config_mod', name=name, item=item)
 
 
-def get_config_dict(ipadefaultloginshell=None, ipadefaultemaildomain=None):
+def get_config_dict(ipadefaultloginshell=None, ipadefaultemaildomain=None, ipadomainresolutionorder=None):
     config = {}
     if ipadefaultloginshell is not None:
         config['ipadefaultloginshell'] = ipadefaultloginshell
     if ipadefaultemaildomain is not None:
         config['ipadefaultemaildomain'] = ipadefaultemaildomain
+    if ipadomainresolutionorder is not None:
+        config['ipadomainresolutionorder'] = ipadomainresolutionorder
+
 
     return config
 
@@ -88,6 +93,7 @@ def ensure(module, client):
     module_config = get_config_dict(
         ipadefaultloginshell=module.params.get('ipadefaultloginshell'),
         ipadefaultemaildomain=module.params.get('ipadefaultemaildomain'),
+        ipadomainresolutionorder=module.params.get('ipadomainresolutionorder'),
     )
     ipa_config = client.config_show()
     diff = get_config_diff(client, ipa_config, module_config)
@@ -110,6 +116,7 @@ def main():
     argument_spec.update(
         ipadefaultloginshell=dict(type='str', aliases=['loginshell']),
         ipadefaultemaildomain=dict(type='str', aliases=['emaildomain']),
+        ipadomainresolutionorder=dict(type='str'),
     )
 
     module = AnsibleModule(

@ansibot
Copy link
Contributor

ansibot commented Apr 29, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Apr 29, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 feature This issue/PR relates to a feature request. identity Identity category ipa IPA community module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Apr 29, 2019
@Akasurde
Copy link
Member

@RobVerduijn Thanks for reporting this feature. Would you be interested in raising a PR with your findings ? Thanks.

@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Apr 30, 2019
@RobVerduijn
Copy link
Author

Hi,
Sure no problem, but I don't know where to start.

this page is not helping:
https://docs.ansible.com/ansible/latest/community/development_process.html

It asumes you got the privilege to commit to ansible branches.
I don't have that.

Is there a page where they describe how to do this if you are not a recognised ansible developer ?

Rob

@Akasurde
Copy link
Member

@RobVerduijn You don't need privileges to commit to Ansible branch. First fork Ansible project in your account and then create a feature branch and the commit to that branch. After your changes are tested, you can create pull request with this feature.

Let me know if you need any help for this.

Thanks.

@RobVerduijn
Copy link
Author

Hi,
I forked the project and branched it.
https://github.com/RobVerduijn/ansible/tree/add_ipadomainresolutionorder
The commit containing the patch:
0ebf77f

How do I get it tested ?
Is there a bot somewhere that I need to trigger ?

Creating a pull request is not a problem, I guess against the devel branch.
Rob

@jctanner
Copy link
Contributor

jctanner commented May 3, 2019

@RobVerduijn please create the pr from your new branch by following https://help.github.com/en/articles/creating-a-pull-request

Once the pr is created, the automated tests will run against it and report the results.

@RobVerduijn
Copy link
Author

The pr has been created quite some time ago, did I forget something or is over 7 weeks a normal time for a response ?

Rob

@ansibot ansibot added the has_pr This issue has an associated PR. label Jul 27, 2019
@ansibot ansibot added collection Related to Ansible Collections work collection:community.general needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md labels Apr 29, 2020
@ansibot
Copy link
Contributor

ansibot commented Aug 16, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@ansibot ansibot closed this as completed Aug 16, 2020
@ansible ansible locked and limited conversation to collaborators Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bot_closed collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. identity Identity category ipa IPA community module This issue/PR relates to a module. needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

No branches or pull requests

4 participants