When I attempt to use the yum module to install the group gnome-desktop-environment I get the first result below, which reports: “No packages marked for update”. Note that I have also tried “state=present” which reports that there is nothing to do (virtualbox-iso: ok: [localhost] => {“changed”: false, “msg”: “”, “rc”: 0, “results”: [“@gnome-desktop-environment: Nothing to do”]}).
When I change to use a shell command to invoke yum to groupinstall gnome-desktop-environment the install works, which is shown in the second result below.
I am either missing a trick here, or this is just plain wrong.
A colleague suggested that I also try with @GNOME Desktop"
The result is below. This is the same outcome as trying the gnome-desktop-environment form of the group name, which is to say that the response is “Nothing to do”.
I know that this is not correct, as manually trying the same install does work, as does using a shall command, so I think that this is broken.
The install process worked, i.e. “Completed”, but what was installed was not quite what I wanted, as the X portions were still missing. So, a good test, but something is still amiss here.
I’ll wait a bit to see if anyone else has anything to say, then create an issue for the GitHub Ansible project pointing to this thread.
In some yum subcommands yum will handle both types transparently. For instance: “yum groups install gnome-desktop-environment”. Unfortunately, ansible needs to install all packages in a single transaction to avoid some cornercases with package dependencies. So we don’t specifically use groups install. Instead we specify that certain names are groups instead of packages like this: “yum install @development-tools”. When groups are given to the install command, you need to specify package groups and environment groups using slightly different syntax. Since the gnome-desktop-environment group is an environmental group, its syntax is like this: @^gnome-deskop-environment. So the yum command is: “yum install @development-tools @^gnome-desktop-environment”.
Specifying that to ansible is then simply:
yum:
name:
“@development-tools”
“@^gnome-desktop-environment”
state: latest
You can tell which type of group you are dealing with by doing a “yum group list” and looking for which category your desired group falls under in the output.