Ah that's true , i'd ideally though prefer not to parse the file for the
information but request it from the db but hey ho, it's a workable solution
;-)

On 24 October 2014 17:29, Ashby, Jason (IMS) <[email protected]> wrote:

>  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:* [email protected] [mailto:[email protected]]
> *On Behalf Of *Jon Shanks
> *Sent:* Friday, October 24, 2014 12:24 PM
> *To:* [email protected]
> *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.
>
_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list

Reply via email to