# YUM features: groupinstall and enable/disable repo

**URL:** <https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552>\
**Category:** Ansible Project\
**Created:** [May 16, 2012, 1:10pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552 "2012-05-16T13:10:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Grozak](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@Mike\_Grozak](https://forum.ansible.com/u/Mike_Grozak)\
**Post date:** [May 16, 2012, 1:10pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/1 "2012-05-16T13:10:31Z")

</div>

Dear Ansible Team and Users,

1) Could you please tell me, is it possible to implement the  
installation of the packages from the certain repositories without  
enabling them globally?  
2) Can I install group of packages, instead of naming them separately?  
3) From your point of you, what is the best schema for massive ansible  
deployment for 500+ desktop linux machines?

Thank you in advance,

WBR, Mike Grozak

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 16, 2012, 1:23pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/2 "2012-05-16T13:23:57Z")

</div>

> Dear Ansible Team and Users,
> 
> 1. Could you please tell me, is it possible to implement the  
> installation of the packages from the certain repositories without  
> enabling them globally?

not presently, unless you just ran yum via the command/shell module or something

> 1. Can I install group of packages, instead of naming them separately?

deferring Q to others.

> 1. From your point of you, what is the best schema for massive ansible  
> deployment for 500+ desktop linux machines?

Didn’t quite grok “schema” here. Setup? Yum specific question or ansible  
scaling in general?

---

<div class="post-metadata">

**Author:** ![Mike\_Grozak](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@Mike\_Grozak](https://forum.ansible.com/u/Mike_Grozak)\
**Post date:** [May 16, 2012, 3:00pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/3 "2012-05-16T15:00:49Z")

</div>

Hello,

> not presently, unless you just ran yum via the command/shell module or something

Ok, I'll try to have a look at the source code of yum module, maybe  
I'll find a way to implement it for me

> \> 3) From your point of you, what is the best schema for massive ansible  
> \> deployment for 500+ desktop linux machines?
> 
> Didn't quite grok "schema" here. Setup? Yum specific question or ansible  
> scaling in general?

Ansible scaling in general.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 16, 2012, 3:03pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/4 "2012-05-16T15:03:21Z")

</div>

> > Didn’t quite grok “schema” here. Setup? Yum specific question or ansible  
> > scaling in general?
> 
> Ansible scaling in general.

Depends if you need to configure at initial provisioning time or repeatedly.

For repeatedly, check out ansible-pull, which has a playbook to set it up in the examples dir.

Uses cron+git, and inverts the push architecture.

Should scale like crazy, and bootstraps itself (mostly) just like regular Ansible – so it’s easy to reconfigure.

(it technically assumes you have a yum repo that can find ansible, which you can set up with ansible)

–Michael

---

<div class="post-metadata">

**Author:** ![Mike\_Grozak](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@Mike\_Grozak](https://forum.ansible.com/u/Mike_Grozak)\
**Post date:** [May 16, 2012, 3:30pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/5 "2012-05-16T15:30:39Z")

</div>

Ok, thank you for the answers. I'll try to install and setup ansible-  
pull; we'll see want will come out 🙂

---

<div class="post-metadata">

**Author:** ![Seth\_Vidal](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Post date:** [May 16, 2012, 7:31pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/6 "2012-05-16T19:31:34Z")

</div>

> Dear Ansible Team and Users,
> 
> 1) Could you please tell me, is it possible to implement the  
> installation of the packages from the certain repositories without  
> enabling them globally?

You want some way to pass in 'enable this repo'? If the .repo file is  
on the system then, sure, we could probably add something to do that.  
Alternatively a simple mechanism for you - since ansible runs in serial  
would be to have

action: command yum-config-manager --enable somerepo somerepo1  
action: yum state=installed pkg=foo  
action: command yum-config-manager --enable somerepo somerepo1

Otherwise we'd need to modify the yum module to take  
repoenables/disables as a part of the arguments which feels a bit  
weird to me since from a declarative standpoint it feels awkward.

> 2) Can I install group of packages, instead of naming them separately?

the module currently doesn't support groups - only b/c the check to see  
if the pkg is available is going to trip over the @group syntax. I can  
pretty easily manage for that - but just to be clear the process to  
check if a group is installed is.... a bit of a guess, really. It's a  
heuristic which is not fantastic but 'works'.

I could probably make @groupname look there first.

However, I would want to reserve the right to just make state=removed  
pkg=@groupname do exactly nothing b/c removing groups w/o user  
intervention can be..... dangerous.

-sv

---

<div class="post-metadata">

**Author:** ![Mike\_Grozak](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@Mike\_Grozak](https://forum.ansible.com/u/Mike_Grozak)\
**Post date:** [May 16, 2012, 9:20pm UTC](https://forum.ansible.com/t/yum-features-groupinstall-and-enable-disable-repo/11552/7 "2012-05-16T21:20:17Z")

</div>

Thank you for the answers!

> \> 1) Could you please tell me, is it possible to implement the  
> \> installation of the packages from the certain repositories without  
> \> enabling them globally?
> 
> You want some way to pass in 'enable this repo'? If the .repo file is  
> on the system then, sure, we could probably add something to do that.  
> Alternatively a simple mechanism for you - since ansible runs in serial  
> would be to have
> 
> action: command yum-config-manager --enable somerepo somerepo1  
> action: yum state=installed pkg=foo  
> action: command yum-config-manager --enable somerepo somerepo1
> 
> Otherwise we'd need to modify the yum module to take  
> repoenables/disables as a part of the arguments which feels a bit  
> weird to me since from a declarative standpoint it feels awkward.

I thought about something like:

&nbsp;&nbsp;action: yum state=installed pkg=foo repo=rpmforge

or, sometimes, it's better to specify 2 repos:

&nbsp;&nbsp;action: yum state=installed pkg=foo repo=rpmforge,epel

To be honest, it looks rather clean to me:) Without "repo" argument  
the installation is performed in a standard way; with it - with  
"enablerepo" argument to the yum command.

> \> 2) Can I install group of packages, instead of naming them separately?
> 
> the module currently doesn't support groups - only b/c the check to see  
> if the pkg is available is going to trip over the @group syntax. I can  
> pretty easily manage for that - but just to be clear the process to  
> check if a group is installed is.... a bit of a guess, really. It's a  
> heuristic which is not fantastic but 'works'.
> 
> I could probably make @groupname look there first.
> 
> However, I would want to reserve the right to just make state=removed  
> pkg=@groupname do exactly nothing b/c removing groups w/o user  
> intervention can be..... dangerous.

According to my experience, on a common Linux system, administrator  
does not really want to delete anything massively from the initial  
installation. From the other side, in an ideal world, such action  
should be possible - for example, when you want to clean up the  
systems from the unnecessary localization groups, legacy software  
support, or clean up a bit after an upgrade to the next minor release,  
for example SL 6.1 to 6.2, etc.

The idea of group installation itself is coming from the attempt to  
migrate the list of packages and package groups from a kickstart file  
to the systems like ansible or puppet, b/c as opposed to kickstart  
they could control their presence and integrity - at least, it looks  
logical for them.

I also agree, that now there is no fast way to check the presence and  
completeness of a group 🙂 So, maybe the group functionality should be  
left to the kickstart file, you are right, and we should accept such  
compromise.

Thank you for your comments, anyway, they are quiet valuable for  
understanding the ansible and its lifestyle 🙂
