[Spacewalk-list] questions about spacecmd and rhnreg_ks

Peirce, Dean Dean.Peirce at cengage.com
Tue Aug 13 14:35:12 UTC 2019


I’ve added the spacecmd package to the client systems and scripted adding the spacewalk client system to specific groups, something like:
/usr/bin/spacecmd --quiet —server=spacewalk.foo.com<http://spacewalk.foo.com> —user=spaced_user —password=xxxxxxxxxx —nossl group_addsystems prod_web $ThisHost
The above will add $ThisHost to the prod_web group in spacewalk.
Note that your creds from your login to the spacewalk server will be saved in a .spacecmd directory ;)


Dean


On Aug 13, 2019, at 10:23 AM, Eckert, Doug <Doug.Eckert at dowjones.com<mailto:Doug.Eckert at dowjones.com>> wrote:

For #1, you can create separate activation key(s) that will place the client in whatever group(s) and assign specific base/child channels, then use --activationkey "<your-key-name>" with rhnreg_ks as appropriate for each client.





On Tue, Aug 13, 2019 at 9:55 AM Ananta Chakravartula <ananta.c at googlemail.com<mailto:ananta.c at googlemail.com>> wrote:
I created groups dev/stage/prod and assigned nodes to those groups depending on our chef client environment.

My questions

1) whenever I run `rhnreg_ks` on clients, i want to run a script on the server to add the node to a certain group and  set basechannel depending on the environment. for example I want all the prod nodes to be set to base channel prod-xxx. I wrote some code for that, but how can i trigger it on rhnreg_ks, is it possible?

2) I don't see any option in here<https://spacewalkproject.github.io/documentation/api/2.9/handlers/ServerGroupHandler.html%20.> to set all the nodes in a group to certain base channel.It will be nice to add that , is there any space where I can create a PR or suggest?
This<https://spacewalkproject.github.io/documentation/api/2.9/handlers/SystemHandler.html#setBaseChannel> takes only systemid, it will be nice if it can take groupname or groupid

3) How can i set spacecmd not to cache in config? I run in to many issues with spacecmd not doing what it is supposed to be even after confirming the changes in stdout. Some gets cleared vi clear_caches. I also can't reproduce the issues, so i can't open bug report. It will be nice and handy if there is any config option not to do caching.

cheers,
ac


_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list




_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20190813/f8f67a80/attachment.htm>


More information about the Spacewalk-list mailing list