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 1918025 - [RFE] Add ability to run modules remotely
Summary: [RFE] Add ability to run modules remotely
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ansible-freeipa
Version: 8.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Rafael Jeffman
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks: 1861910 1861912
TreeView+ depends on / blocked
 
Reported: 2021-01-19 21:24 UTC by Ade Lee
Modified: 2022-05-10 14:02 UTC (History)
5 users (show)

Fixed In Version: ansible-freeipa-0.4.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:38:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-6762 0 None None None 2021-09-22 10:30:19 UTC
Red Hat Product Errata RHBA-2022:1791 0 None None None 2022-05-10 13:38:43 UTC

Description Ade Lee 2021-01-19 21:24:26 UTC
Description of problem:

Right now, it appears that many of the modules (ipahost, ipaservice etc.) are required to run on the ipa server.  Therefore, they are not really a replacement
for the ipa_host, ipa_service etc. modules that are in the community version upstream.  Those can be run remotely and it is possible to authenticate using admin user/pass or GSSAPI.

Requiring the modules to be run on the ipa server means having to provide ssh credentials onto the ipa server to, for example, an openstack deployer.  This is something folks could be loath to do.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Thomas Woerner 2021-04-15 16:17:07 UTC
Mot of the modules are currently using the IPA API with the server context. What might be doable is to enable the use of the modules on clients also.

Comment 3 Rafael Jeffman 2021-04-15 18:55:26 UTC
Currently, only `vault` does not use the server context.

By setting the context in ansible_freeipa_module:api_connect() to `ansible-freeipa`, I was able to run a few modules (tested with permission and privilege) in a client host.

We could add a bool variable `ipa_client_context`, which would default to `no`, to be available in all modules that can be run in a client or server context (e.g. vault would not use it, as it only runs in client context).

Comment 4 Rafael Jeffman 2021-06-20 16:43:22 UTC
There is an upstream PR for this issue: https://github.com/freeipa/ansible-freeipa/pull/575

Comment 5 Theodoros Apazoglou 2021-09-24 11:32:11 UTC
The above PR was closed in favor of PR https://github.com/freeipa/ansible-freeipa/pull/631

Comment 6 Thomas Woerner 2021-09-29 10:20:59 UTC
https://github.com/freeipa/ansible-freeipa/pull/631 has been merged upstream.

Comment 12 Varun Mylaraiah 2021-10-17 12:13:44 UTC
Verified

ansible-freeipa-0.4.0-1.el8.noarch

2021-10-17T11:41:35 ============================= test session starts ==============================
2021-10-17T11:41:35 platform linux -- Python 3.9.6, pytest-3.10.1, py-1.10.0, pluggy-1.0.0 -- /usr/bin/python3
2021-10-17T11:41:35 cachedir: .pytest_cache
2021-10-17T11:41:35 metadata: {'Python': '3.9.6', 'Platform': 'Linux-5.11.12-300.fc34.x86_64-x86_64-with-glibc2.33', 'Packages': {'pytest': '3.10.1', 'py': '1.10.0', 'pluggy': '1.0.0'}, 'Plugins': {'metadata': '1.11.0', 'html': '1.22.1', 'sourceorder': '0.5.1', 'multihost': '3.4'}, 'CI': 'true', 'BUILD_NUMBER': '1072', 'BUILD_ID': '1072', 'BUILD_URL': 'https://ci-jenkins-csb-idmops.apps.ocp-c1.prod.psi.redhat.com/job/trigger-test-suite-tool/1072/', 'NODE_NAME': 'permanent-ftrivino-jenkins-big-agent-10', 'JOB_NAME': 'trigger-test-suite-tool', 'BUILD_TAG': 'jenkins-trigger-test-suite-tool-1072', 'EXECUTOR_NUMBER': '2', 'JENKINS_URL': 'https://ci-jenkins-csb-idmops.apps.ocp-c1.prod.psi.redhat.com/', 'WORKSPACE': '/home/fedora/workspace/trigger-test-suite-tool'}
2021-10-17T11:41:35 rootdir: /home/fedora/workspace/trigger-test-suite-tool/ansible-freeipa-tests, inifile:
2021-10-17T11:41:35 plugins: metadata-1.11.0, html-1.22.1, sourceorder-0.5.1, multihost-3.4
2021-10-17T11:41:35 collecting ... collected 46 items
2021-10-17T11:41:35 
2021-10-17T11:51:18 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestRemoteModuleExecutionPrerequiste::test_prerequisite PASSED [  2%]
2021-10-17T11:51:33 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestUser::test_remote_module_user_add PASSED [  4%]
2021-10-17T11:51:45 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestUser::test_remote_module_user_delete PASSED [  6%]
2021-10-17T11:52:15 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestGroup::test_remote_module_group_add_and_modify PASSED [  8%]
2021-10-17T11:52:36 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestGroup::test_remote_module_group_delete PASSED [ 10%]
2021-10-17T11:53:01 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHost::test_remote_module_host_add_and_modify PASSED [ 13%]
2021-10-17T11:53:14 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHost::test_remote_module_host_delete PASSED [ 15%]
2021-10-17T11:53:30 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHost::test_remote_module_hostgroup_add PASSED [ 17%]
2021-10-17T11:53:41 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHost::test_remote_module_hostgroup_delete PASSED [ 19%]
2021-10-17T11:53:59 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestPasswordpolicy::test_remote_module_pwpolicy_add PASSED [ 21%]
2021-10-17T11:54:12 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestPasswordpolicy::test_remote_module_pwpolicy_remove PASSED [ 23%]
2021-10-17T11:54:26 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestLocation::test_remote_module_location_add PASSED [ 26%]
2021-10-17T11:54:37 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestLocation::test_remote_module_location_remove PASSED [ 28%]
2021-10-17T11:55:05 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestAutomember::test_remote_module_automember_group_hostgroup_rule_add_and_modify PASSED [ 30%]
2021-10-17T11:55:23 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestAutomember::test_remote_module_automember_group_hostgroup_rule_remove PASSED [ 32%]
2021-10-17T11:55:36 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestAutomount::test_remote_module_automount_location_add PASSED [ 34%]
2021-10-17T11:55:48 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestAutomount::test_remote_module_automount_location_remove PASSED [ 36%]
2021-10-17T11:56:08 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestConfig::test_remote_module_config_update PASSED [ 39%]
2021-10-17T11:56:28 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestService::test_remote_module_service_add_and_modify PASSED [ 41%]
2021-10-17T11:56:39 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestService::test_remote_module_service_remove PASSED [ 43%]
2021-10-17T11:57:32 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnsconfig_add PASSED [ 45%]
2021-10-17T11:57:44 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnsconfig_remove PASSED [ 47%]
2021-10-17T11:58:05 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnsforwardzone_add PASSED [ 50%]
2021-10-17T11:58:17 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnsforwardzone_remove PASSED [ 52%]
2021-10-17T11:58:31 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnszone_add PASSED [ 54%]
2021-10-17T11:58:43 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnszone_remove PASSED [ 56%]
2021-10-17T11:59:18 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnsrecords_add PASSED [ 58%]
2021-10-17T11:59:31 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestDNS::test_remote_module_dnsrecords_remove PASSED [ 60%]
2021-10-17T11:59:45 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHBAC::test_remote_module_hbacsvc_add PASSED [ 63%]
2021-10-17T11:59:59 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHBAC::test_remote_module_hbacsvcgroup_add PASSED [ 65%]
2021-10-17T12:00:09 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHBAC::test_remote_module_hbacrule_add PASSED [ 67%]
2021-10-17T12:00:35 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestHBAC::test_remote_module_hbacrule_hbacsvc_hbacsvcgroup_reomve PASSED [ 69%]
2021-10-17T12:00:48 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestRBAC::test_remote_module_rbac_delegation_add PASSED [ 71%]
2021-10-17T12:00:59 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestRBAC::test_remote_module_rbac_privilege_add PASSED [ 73%]
2021-10-17T12:01:14 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestRBAC::test_remote_module_rbac_role_add PASSED [ 76%]
2021-10-17T12:01:26 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestRBAC::test_remote_module_rbac_selfservice_add PASSED [ 78%]
2021-10-17T12:01:38 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestRBAC::test_remote_module_rbac_permission_add PASSED [ 80%]
2021-10-17T12:01:51 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestSudo::test_remote_module_sudo_cmd_add PASSED [ 82%]
2021-10-17T12:02:03 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestSudo::test_remote_module_sudo_rule_add PASSED [ 84%]
2021-10-17T12:02:14 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestSudo::test_remote_module_sudo_command_group_add PASSED [ 86%]
2021-10-17T12:02:42 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestSudo::test_remote_module_sudo_command_rule_cmdgroup_remove PASSED [ 89%]
2021-10-17T12:05:36 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestVault::test_remote_module_vault_standard_add PASSED [ 91%]
2021-10-17T12:05:48 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestVault::test_remote_module_vault_symmetric_add PASSED [ 93%]
2021-10-17T12:06:05 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestVault::test_remote_module_vault_asymmetric_add PASSED [ 95%]
2021-10-17T12:06:17 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestVault::test_remote_module_vault_standard_symmetric_asymmetric_remove PASSED [ 97%]
2021-10-17T12:06:29 ansible_freeipa_tests/remote_module_execution/test_remote_module_execution.py::TestMiscellaneous::test_remote_module_context_server_on_client_host PASSED [100%]
2021-10-17T12:06:29 
2021-10-17T12:06:29 - generated xml file: /home/fedora/workspace/trigger-test-suite-tool/test-suite/junit.xml -
2021-10-17T12:06:29 - generated html file: file:///home/fedora/workspace/trigger-test-suite-tool/test-suite/report.html -
2021-10-17T12:06:29 ========================= 46 passed in 1494.00 seconds =========================

Comment 16 errata-xmlrpc 2022-05-10 13:38:24 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/RHBA-2022:1791


Note You need to log in before you can comment on or make changes to this bug.