Download an RPM from the command line from the customer portal

Latest response

I'm working on an Ansible role to register servers using the rhn_subscribe module. However, several of the modules used in the role (basically anything useful) require that libselinux-python is installed first. I can't download or install libselinux-python with yum since the server will not be registered yet. Chicken and egg problem. I thought I would try downloading the libselinux-python rpm directly from the customer portal and installing it with the yum module and then go from there but in my searching I've only seen solutions that are good within a short windows because they time out after a while (sessions, certificates, etc) Is there a way to authenticate to the customer portal from the command line, using curl or wget or something similar and then download an RPM file and to be able to do this repeatedly and consistently assuming that I have the necessary credentials?

Thanks!

Responses