Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1894497

Summary: [RFE] management module ipalocation
Product: Red Hat Enterprise Linux 8 Reporter: Thomas Woerner <twoerner>
Component: ansible-freeipaAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: mvarun, ndehadra, pcech, pvoborni
Target Milestone: rcKeywords: FutureFeature, RFE
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-freeipa-0.3.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:51:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1894575    

Description Thomas Woerner 2020-11-04 11:17:01 UTC
New management module ipalocation

There is a new location management module placed in the plugins folder:

plugins/modules/ipalocation.py

The location module allows to ensure presence or absence of locations.

Here is the documentation for the module:

README-location.md

New example playbooks have been added:

playbooks/location/location-absent.yml
playbooks/location/location-present.yml

New tests for the module:

tests/location/test_location.yml

Upstream PR: https://github.com/freeipa/ansible-freeipa/pull/349

Comment 9 Varun Mylaraiah 2020-12-11 10:41:59 UTC
Verified
ansible-freeipa-0.3.1-1.el8.noarch



2020-12-11T07:48:32+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_add_with_description 
2020-12-11T07:48:32+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:48:32+0000 [paramiko.transport] INFO Connected (version 2.0, client OpenSSH_8.0)
2020-12-11T07:48:32+0000 [paramiko.transport] INFO Authentication (publickey) successful!
2020-12-11T07:48:32+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipactl', 'status']
2020-12-11T07:48:32+0000 [paramiko.transport] INFO Connected (version 2.0, client OpenSSH_8.0)
2020-12-11T07:48:32+0000 [paramiko.transport] INFO Authentication (publickey) successful!
2020-12-11T07:48:32+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/master.hosts
2020-12-11T07:48:33+0000 [paramiko.transport.sftp] INFO [chan 0] Opened sftp connection (server version 3)
2020-12-11T07:48:33+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT install-server.yaml
2020-12-11T07:48:33+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/master.hosts', 'install-server.yaml']
2020-12-11T07:56:01+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipactl', 'status']
2020-12-11T07:56:03+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:03+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '01MytestLocation']
2020-12-11T07:56:04+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:04+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:04+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:04+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:09+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:09+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '01MytestLocation']
2020-12-11T07:56:10+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:10+0000 PASSED                                                                   [ 14%]
2020-12-11T07:56:10+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_update_with_new_description 
2020-12-11T07:56:10+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:56:10+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:10+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '01MytestLocation']
2020-12-11T07:56:11+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:11+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:11+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:11+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:16+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:16+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '01MytestLocation']
2020-12-11T07:56:17+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:17+0000 PASSED                                                                   [ 28%]
2020-12-11T07:56:17+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_add_without_description 
2020-12-11T07:56:17+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:56:17+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:17+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '02MytestLocation']
2020-12-11T07:56:18+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:18+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:18+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:18+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:23+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:23+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '02MytestLocation']
2020-12-11T07:56:24+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:24+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:24+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '02MytestLocation']
2020-12-11T07:56:25+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:25+0000 PASSED                                                                   [ 42%]
2020-12-11T07:56:25+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_delete_single 
2020-12-11T07:56:25+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:56:25+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:25+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '01MytestLocation']
2020-12-11T07:56:26+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:26+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:26+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:26+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:31+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:31+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-show', '01MytestLocation']
2020-12-11T07:56:32+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:32+0000 PASSED                                                                   [ 57%]
2020-12-11T07:56:32+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_delete_multiple 
2020-12-11T07:56:32+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:56:32+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:32+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-add', '03MytestLocation']
2020-12-11T07:56:33+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:34+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-find']
2020-12-11T07:56:34+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:35+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:35+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:35+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:41+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T07:56:41+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'location-find']
2020-12-11T07:56:42+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T07:56:42+0000 PASSED                                                                   [ 71%]
2020-12-11T07:56:42+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_with_negative_scenarios[add_without_name-missing required arguments: name] 
2020-12-11T07:56:42+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:56:42+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:42+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:42+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:45+0000 PASSED                                                                   [ 85%]
2020-12-11T07:56:45+0000 ansible_freeipa_tests/location_module.py::TestLocaton::test_location_with_negative_scenarios[add_description_with_trailing_space-invalid 'description': Leading and trailing spaces are not allowed] 
2020-12-11T07:56:45+0000 -------------------------------- live log call ---------------------------------
2020-12-11T07:56:45+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/location.hosts
2020-12-11T07:56:45+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT location_module.yml
2020-12-11T07:56:45+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/location.hosts', 'location_module.yml']
2020-12-11T07:56:49+0000 PASSED                                                                   [100%]
2020-12-11T07:56:49+0000 
2020-12-11T07:56:49+0000 ----------- generated xml file: /home/jenkins/tews/trigger/junit.xml -----------
2020-12-11T07:56:49+0000 ------ generated html file: file:///home/jenkins/tews/trigger/report.html ------
2020-12-11T07:56:49+0000 ========================== 7 passed in 499.06 seconds ==========================


Based on the test result, marking the bug VERIFIED.

Comment 11 errata-xmlrpc 2021-05-18 15:51:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ansible-freeipa bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1860