Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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.
Description of problem:
We can't choose which roles we want to import. The command import all available roles.
Version-Release number of selected component (if applicable):
6.4#13
How reproducible:
100%
Steps to Reproduce:
1. We have got a satellite 6.4
> hammer ansible roles import
Result:
The following ansible roles were changed
Imported:
1) geerlingguy.ntp
> hammer ansible roles import --help
Usage:
hammer ansible roles import [OPTIONS]
Options:
--location LOCATION_NAME Location name
--location-id LOCATION_ID
--location-title LOCATION_TITLE Location title
--organization ORGANIZATION_NAME Organization name
--organization-id ORGANIZATION_ID Organization ID
--organization-title ORGANIZATION_TITLE Organization title
--proxy-id PROXY_ID Capsule to import from
-h, --help Print help
Actual results:
We can't choose which roles we want to import.
Expected results:
We can choose which roles we want to import. Something same as in WebUI.
Additional info:
bz1590854
Sorry for taking so long to reply.
I'm not sure if it is actually the hammer plugin problem, since hammer relies on Foreman's Ansible plugin API and the endpoint for the import command doesn't provide options for selecting specific roles. It just import all of them from a specific Smart proxy.
Hi Oleh,
missing API in backend is not a reason for unsolving of this issue.
I don't say it have to be fixed in this version of satellite, but it is really important for automatization.
Oleh, could you please look at how much work it would be to extend foreman_ansible API so that it allows what Martin asks for? I think it would be a good addition. Once API is there, we could enhance also the hammer plugin.
VERIFIED.
@satellite-6.6.0-5.beta.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_ansible-0.3.0-2.el7sat.noarch
ansible-2.8.0-1.el7ae.noarch
by the following set of commands:
# hammer ansible roles import --help
Usage:
hammer ansible roles import [OPTIONS]
Options:
--location LOCATION_NAME Location name
--location-id LOCATION_ID
--location-title LOCATION_TITLE Location title
--organization ORGANIZATION_NAME Organization name
--organization-id ORGANIZATION_ID Organization ID
--organization-title ORGANIZATION_TITLE Organization title
--proxy-id PROXY_ID Capsule to import from
--role-names ROLE_NAMES Ansible role names to import
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
# hammer ansible roles import --proxy-id 1 --role-names geerlingguy.ntp,linuxhq.setup
Result:
The following ansible roles were changed
Imported:
1) linuxhq.setup
2) geerlingguy.ntp
[root@dell-per415-01 ~]# hammer ansible roles list
---|-----------------|--------------------
ID | NAME | IMPORTED AT
---|-----------------|--------------------
5 | linuxhq.setup | 2019/06/10 12:03:52
6 | geerlingguy.ntp | 2019/06/10 12:03:52
---|-----------------|--------------------
>>> In CLI the user has now some sort of control of what is being imported and what not
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, 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/RHSA-2019:3172