[Pulp-list] listing repos you're bound to

Ashby, Jason (IMS) AshbyJ at imsweb.com
Fri Oct 24 16:29:40 UTC 2014


You could grep the /etc/yum.repos.d/pulp.repo file to check if it’s already bound.  That’s if you’re servers are just using yum stuff.

If you’re using puppet, the following does well for me:

  exec { "pulp-bind-Some-Repo":
    command => "pulp-consumer rpm bind --repo-id=Some-Repo",
    unless  => "grep -q Some-Repo /etc/yum.repos.d/pulp.repo",
  }

Maybe there is a better way to look it up with the pulp-consumer command, but I’m not sure.

From: pulp-list-bounces at redhat.com [mailto:pulp-list-bounces at redhat.com] On Behalf Of Jon Shanks
Sent: Friday, October 24, 2014 12:24 PM
To: Pulp-list at redhat.com
Subject: [Pulp-list] listing repos you're bound to

Hi,

I was wondering if there is a way of listing the repos a consumer is bound to as to not bind to repo's it's already part of. I am automating the binding but i need a way of returning what it's already bound to to know that it isn't part of it already. However, the only thing i can see is to look at the history for a repo_bound event-type, but that seems slightly cumbersome and also, it's possible there could be an unbind and a rebind, so i'd have to compare the history of both event types to figure out the logic of what state it is in in relation to what the request is.

Any help appreciated here as struggling to see in the docs.

Thanks

Jon


________________________________

Information in this e-mail may be confidential. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender of the error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20141024/827aea97/attachment.htm>


More information about the Pulp-list mailing list