HI
I am working on a role here:
Which is used in a Packer build here:
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.
Any ideas anyone?
Many thanks
Nathan
First result
--------------
With RedHat.yml with:
- name: Install RedHat Gnome desktop
#TODO: In theory one should be able to do this:
yum: name="@gnome-desktop-environment" state=latest
#BUT, I have been unable to get that to work, so:
#shell: yum -y groupinstall gnome-desktop-environment
I get:
virtualbox-iso: TASK: [ansible-linux-desktop | Install RedHat Gnome desktop] ******************
virtualbox-iso: <localhost> REMOTE_MODULE yum name= state=latest
virtualbox-iso: <localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445340469.26-97807224264836 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1445340469.26-97807224264836 && echo $HOME/.ansible/tmp/ansible-tmp-1445340469.26-97807224264836']
virtualbox-iso: <localhost> PUT /tmp/tmpUXuUTj TO /home/vagrant/.ansible/tmp/ansible-tmp-1445340469.26-97807224264836/yum
virtualbox-iso: <localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=uvezdafkleudwpucmmsrzghddspdlqad] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-uvezdafkleudwpucmmsrzghddspdlqad; LANG=C LC_CTYPE=C /usr/bin/python -tt /home/vagrant/.ansible/tmp/ansible-tmp-1445340469.26-97807224264836/yum; rm -rf /home/vagrant/.ansible/tmp/ansible-tmp-1445340469.26-97807224264836/ >/dev/null 2>&1'"'"''
virtualbox-iso: changed: [localhost] => {"changed": true, "msg": "Warning: Package group gnome-desktop-environment does not exist.\n", "rc": 0, "results": ["Loaded plugins: fastestmirror, langpacks\nLoading mirror speeds from cached hostfile\n * base:
mirror.tedra.es\n * epel:
ftp.rediris.es\n * extras:
mirror.tedra.es\n * updates:
mirror.tedra.es\nNo packages marked for update\n"]}
Second result
-------------------
When I change to:
- name: Install RedHat Gnome desktop
#TODO: In theory one should be able to do this:
#yum: name="@gnome-desktop-environment" state=latest
#BUT, I have been unable to get that to work, so:
shell: yum -y groupinstall gnome-desktop-environment
I get:
TASK: [ansible-linux-desktop | Install RedHat Gnome desktop] ******************
virtualbox-iso: <localhost> REMOTE_MODULE command yum -y groupinstall gnome-desktop-environment #USE_SHELL
virtualbox-iso: <localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445343827.26-139550713552714 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1445343827.26-139550713552714 && echo $HOME/.ansible/tmp/ansible-tmp-1445343827.26-139550713552714']
virtualbox-iso: <localhost> PUT /tmp/tmpG7lqPk TO /home/vagrant/.ansible/tmp/ansible-tmp-1445343827.26-139550713552714/command
virtualbox-iso: <localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=cibzbkzumoqutznqhwjsvofqejqxvchg] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-cibzbkzumoqutznqhwjsvofqejqxvchg; LANG=C LC_CTYPE=C /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1445343827.26-139550713552714/command; rm -rf /home/vagrant/.ansible/tmp/ansible-tmp-1445343827.26-139550713552714/ >/dev/null 2>&1'"'"''
virtualbox-iso: changed: [localhost] => {"changed": true, "cmd": "yum -y groupinstall gnome-desktop-environment", "delta": "0:05:35.508381", "end": "2015-10-20 12:29:22.840576", "rc": 0, "start": "2015-10-20 12:23:47.332195", "stderr": "", "stdout": "Loaded plugins: fastestmirror, langpacks\nLoading mirror speeds from cached hostfile\n * base:
centos.mirror.xtratelecom.es\n * epel:
ftp.cica.es\n * extras:
centos.mirror.xtratelecom.es\n * updates:
centos.mirror.xtratelecom.es\nResolving Dependencies\n--> Running transaction check\n---> Package ModemManager.x86_64 0:1.1.0-6.git20130913.el7 will be installed\n--> Processing Dependency: ModemManager-glib(x86-64) = 1.1.0-6.git20130913.el7 for package: ModemManager-1.1.0-6.git20130913.el7.x86_64\n--> Processing Dependency: libqmi-glib.so.1()(64bit) for package: ModemManager-1.1.0-6.git20130913.el7.x86_64\n--> Processing Dependency: libmm-glib.so.0()(64bit) for package:
[Lots of lines elided]
...
\n xorg-x11-xkb-utils.x86_64 0:7.7-9.1.el7 \n yelp-libs.x86_64 1:3.8.1-7.el7 \n yelp-xsl.noarch 0:3.8.1-2.el7 \n zenity.x86_64 0:3.8.0-4.el7 \n\nComplete!", "warnings": ["Consider using yum module rather than running yum"]}