Bug 1289133 - [RFE] Allow hammer hostgroup to set/update the root password field
[RFE] Allow hammer hostgroup to set/update the root password field
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: --
Assigned To: Shlomi Zadok
Corey Welton
http://projects.theforeman.org/issues...
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-07 08:59 EST by Stephen Benjamin
Modified: 2016-07-27 07:24 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:24:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11236 None None None 2016-04-22 12:49 EDT

  None (edit)
Description Stephen Benjamin 2015-12-07 08:59:16 EST
When you create a host group and associate it with an operating system, it is often useful to set the password (root) so that when you provision a system associated to this host group, you know what password to use when trying to ssh into the system. Currently one cannot use hammer hostgroup command to do that.

I'd like to request an improvement to hammer hostgroup so that one can set/update the password field. Perhaps something like:

<pre>
hammer hostgroup update --name=<name of existing host group> --password=<new value>
</pre>

or

<pre>
hammer hostgroup update --id=<id for existing host group> --password=<new value>
</pre>

This would be useful for automating provisioning scenarios via hammer.
Comment 1 Stephen Benjamin 2015-12-07 08:59:17 EST
Created from redmine issue http://projects.theforeman.org/issues/11236
Comment 2 Stephen Benjamin 2015-12-07 08:59:22 EST
Upstream bug assigned to szadok@redhat.com
Comment 8 Tazim Kolhar 2016-04-05 00:02:51 EDT
VERIFIED:
# rpm -qa foreman
foreman-1.11.0.9-1.el7sat.noarch



# hammer hostgroup update --id 1 --root-pass '*****'
[Foreman] Password for admin: 
Hostgroup updated


2016-04-05 00:01:07 [app] [I] Started PUT "/api/hostgroups/1" for ::1 at 2016-04-05 00:01:07 -0400
2016-04-05 00:01:07 [app] [I] Processing by Api::V2::HostgroupsController#update as JSON
2016-04-05 00:01:07 [app] [I]   Parameters: {"hostgroup"=>{"puppet_proxy_id"=>nil, "puppet_ca_proxy_id"=>nil, "puppetclass_ids"=>nil, "root_pass"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"1"}
2016-04-05 00:01:07 [app] [D] Setting current user thread-local variable to foreman_admin
2016-04-05 00:01:07 [app] [D] Setting current user thread-local variable to nil
2016-04-05 00:01:07 [app] [D] Setting current user thread-local variable to foreman_admin
2016-04-05 00:01:07 [app] [D] Setting current user thread-local variable to nil
2016-04-05 00:01:07 [app] [D] Setting current user thread-local variable to admin
2016-04-05 00:01:07 [app] [I] Authorized user admin(Admin User)
2016-04-05 00:01:07 [app] [D] Setting current user thread-local variable to admin
2016-04-05 00:01:07 [app] [D] Setting current location thread-local variable to none
2016-04-05 00:01:07 [app] [D] Setting current organization thread-local variable to none
2016-04-05 00:01:07 [app] [I]   Rendered api/v2/hostgroups/update.json.rabl (39.3ms)
2016-04-05 00:01:07 [app] [D] Body: {"subnet_id":1,"subnet_name":"test_subnet","operatingsystem_id":2,"operatingsystem_name":"RedHat 7.3","domain_id":1,"domain_name":"rhts.eng.bos.redhat.com","environment_id":1,"environment_name":"production","compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"puppet_proxy_id":null,"puppet_ca_proxy_id":null,"ptable_id":61,"ptable_name":"Kickstart default","medium_id":9,"medium_name":"Default_Organization/Library/rhel7/rhel7_repo","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2016-04-04 13:16:54 UTC","updated_at":"2016-04-05 04:01:07 UTC","id":1,"name":"hostgrp","title":"hostgrp","parameters":[],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":2,"name":"Default Location","title":"Default Location","description":null}],"organizations":[{"id":1,"name":"Default Organization","title":"Default Organization","description":null}]}
2016-04-05 00:01:07 [app] [I] Completed 200 OK in 116ms (Views: 34.0ms | ActiveRecord: 20.2ms)
Comment 11 Bryan Kearney 2016-07-27 07:24:11 EDT
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/RHBA-2016:1501

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