run yum clean metadata to prevent stale cached metadata from interfering with vm update step
This commit is contained in:
Родитель
4fb9557c3b
Коммит
daabd1478c
10
lib/ssh.js
10
lib/ssh.js
|
@ -61,11 +61,15 @@ exports.installPackages = function(host, packages, cb) {
|
|||
};
|
||||
|
||||
exports.updatePackages = function(host, cb) {
|
||||
var cmd = 'ssh -o "StrictHostKeyChecking no" ec2-user@' + host + " sudo yum -y update";
|
||||
var cmd = 'ssh -o "StrictHostKeyChecking no" ec2-user@' + host + " sudo yum --enablerepo=amzn-updates clean metadata";
|
||||
var cp = child_process.exec(cmd, function(err, r) {
|
||||
if (err) return cb(err);
|
||||
cb();
|
||||
})
|
||||
var cmd = 'ssh -o "StrictHostKeyChecking no" ec2-user@' + host + " sudo yum -y update";
|
||||
child_process.exec(cmd, function(err, r) {
|
||||
if (err) return cb(err);
|
||||
cb();
|
||||
});
|
||||
});
|
||||
passthrough(cp);
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче