[1.9.4] Using yum to install groups - 'state: latest' does not work but 'state: present' works

65 views
Skip to first unread message

Asfand Yar Qazi

unread,
Dec 23, 2015, 6:39:35 AM12/23/15
to Ansible Project
Hello,

I thought I would quickly discuss this here before reporting a bug as I could not find an existing bug report:

I tried a task like this:

- name: "Install Development tools package"
  yum: {name: "@Development tools", state: latest}

And it did not install the group, it simply reported as unchanged.

When I switched to state: installed, it worked:

- name: "Install Development tools package"
  yum: {name: "@Development tools", state: installed}

I am using Ansible 1.9.4

Is this bug known? I cannot find a bug report for it.

Thanks

Toshio Kuratomi

unread,
Dec 24, 2015, 9:42:23 AM12/24/15
to ansible...@googlegroups.com

I'm not sitting at my computer to check but this sounds like it might be a known limitation of the yum module listed as the last note in the docs: http://docs.ansible.com/ansible/yum_module.html#notes

Yum has two kinds of groups (package groups listed in the spec file when building the package and environment groups listed in a separate xml file when building the yum repository.)  Sometimes yum will treat these two interchangably.  other times it requires you to specify them using slightly different syntax: "@group" vs "@^group". Unfortunately, the interface ansible is using requires the separate syntax so you have to decide if you are dealing with an environment group or a package group and change your group name appropriately.

-Toshio

Asfand Yar Qazi

unread,
Dec 26, 2015, 4:49:44 AM12/26/15
to ansible...@googlegroups.com
I was just following the Ansible yum module's example, as they
specified '@Development tools', is that wrong then?

Thanks
Regards,
Asfand Yar Qazi
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/bUPjfDj8Ml0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAG9juErr1h6f%2BRxmDkfxJZBh1sL3z%3D9PxjdaziyW1AMyQOQnfA%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages