On Tuesday, May 20, 2014 12:45:45 PM UTC-5, DjE wrote:
>
>
> I agree with you about this potential conflict, but it's a default RedHat 
> configuration with rhsm, and it does not manage exactly the same thing.
>
> Puppet enable the "rhel-6-server-optional-rpms"  which is not by enabled 
> default, and we never said rhsm to enable it (redhat subscription side), so 
> rhsm respect the local decision made via Puppet with the Yumrepo, so it's 
> just a syntax conflict,
>


No, it's not.  rhsm is modifying the repository configuration file, even if 
it is modifying it to a form that is equivalent from Yum's perspective.  If 
rhsm may change the file in any way, then it's managing the file.

 

>   it could be a nice thing that Puppet use the same syntax.
>
>

That might solve your particular issue, but Puppet cannot match the syntax 
details of every piece of software that might conceivably manage Yum 
repository files.  And it's not worthwhile to try, because the underlying 
problem is not a syntax conflict, it's that you have established 
overlapping management responsibilities on your system.

 

> Puppet manage the rhsm.conf file so i tried to disable the manage_repos 
> option, but the redhat.repo file has been destroyed by the rhsmcertd 
> service, and disabled all RedHat repositories.
> Then Puppet creates the /etc/yum.repos.d/rhel-6-server-optional-rpms.repo 
> file with just the "enabled=1" parameter currently define by the Yumrepo 
> resource.
> We don't want to (re)define all the redhat repository urls one by one with 
> the YumRepo resource, maybe there is a better solution.
>
>

You have the alternative of managing repo configuration files via a File 
resource instead of via a Yumrepo resource.  You can control every detail 
of the file's puppet-asserted content that way.  If you want to do that for 
multiple repo config files then you could consider creating a defined type 
for the purpose.  That's a little more limited than the Yumrepo resource 
type, however, because Yumrepo can manage existing repository definitions 
in whatever file they appear, whereas a File resource must manage a 
specific file.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cf31517f-f377-402b-94ef-e093d068a4e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to