2
votes

I have the following puppet content for my vagrant file.

yumrepo { "epel":
 enabled => '1'
}

$req_packages = [ "java-1.7.0-openjdk", "htop", "mysql-server", "php-devel", "mongo"]
package {
 $req_packages :
 ensure => "installed",
 require => Yumrepo[ "epel" ],
}

All yum related operations will have the similar error message.

==> default: Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install mongo' returned 1: Error: Nothing to do
==> default: Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
==> default: 14: problem making ssl connection
==> default: 
==> default: Error: /Stage[main]//Package[mongo]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install mongo' returned 1: Error: Nothing to do
==> default: Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
==> default: 14: problem making ssl connection

I was using config.vm.box = "centos63"

May I know, how can I resolve the above issues?

I even try to disable the ssl verification. However, I'm still get the same error.

yumrepo { "epel":
 enabled => '1',
 sslverify => False,
}
1

1 Answers

0
votes

Disable SSL connection to EPEL (Extra Packages for Enterprise Linux) will do the trick.

exec { "disable ssl":
 path => ["/usr/bin", "/bin"],
 command => "sudo sed -i \"s/mirrorlist=https/mirrorlist=http/\" /etc/yum.repos.d/epel.repo",
 user => 'vagrant',
 group => 'vagrant',
}

yumrepo { "epel":
 enabled => '1',
 sslverify => False,
 require => Exec[ "disable ssl" ],
}

Note, changing the content of /etc/yum.repos.d/epel.repo is the key solution to this problem. sslverify flag is not really needed. But, I think no harm to leave it there.