Yum group install failing but manual command is working.

asked 2018-05-28 15:52:05 -0600

giltea gravatar image

0 down vote favorite Puppet Version: 3.8.7

I have been working on building some system monitoring boxes and have ran into an issue when it comes to installing group yum packages. The normal course of installing packages of course isn't working but I figured that I would at least be able to work around this by including an exec to run the install as a command (like below):

  exec { "GNOME Desktop":

    command => "/usr/bin/yum -y groups install 'GNOME Desktop'",

    timeout => 600,

There is an available module on the puppet forge that seems to do what I want but it's not compatible with our version of puppet and we are not in a place to upgrade at this time.

I also tried the setup that was listed in the below server fault question but it also did not work for me:


I have also manually been able to run the following command but when I exec it as a puppet command, it fails:

/usr/bin/yum -y groups install "GNOME Desktop"

Why is this? I assumed that puppet is just issuing the command in the exact same way the terminal would?

edit retag flag offensive close merge delete


No, it's not as same as the terminal execution. EXEC resource creates a sub-shell on your node for execution of commands you given. That's why it would need executable path, also two exec in your manifest won't be able to communicate(they run in diff sub-shell). Can you please show failure logs?

Mr_Sharma gravatar imageMr_Sharma ( 2018-05-29 05:42:16 -0600 )edit

Here's the error from the puppet run log: Error: /Stage[main]/Display/Exec[yum Group Install]/returns: change from notrun to 0 failed: Command exceeded timeout

giltea gravatar imagegiltea ( 2018-05-29 11:59:19 -0600 )edit

First, use `group` instead of `groups`. Or, at least, in the yum versions I could find a manual for. Could you provide an exact manifest and the logs with debug enabled? Also, observe the Puppet execution and see if you can identify if it freezes in an specific step.

Emerson Prado gravatar imageEmerson Prado ( 2018-05-30 08:26:55 -0600 )edit

Hi Emerson, I have tried this and many other versions of the command. I can also confirm that the proper command for the version of centos I am using is groups and not group. Thanks for the note though, any help is always appreciated.

giltea gravatar imagegiltea ( 2018-05-30 15:32:47 -0600 )edit