Added fix to force apt to do a "apt-get update" before packages are installed.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
James Martin 2012-12-15 13:07:32 -05:00 committed by Rohit Yadav
parent 6507055ba1
commit 0661f9b814
2 changed files with 19 additions and 8 deletions

View File

@ -15,14 +15,22 @@
# specific language governing permissions and limitations
# under the License.
class devcloudinitial {
if $::architecture == 'x86_64'{
$debarch='amd64'
}
else {
$debarch='i386'
}
if $::architecture == 'x86_64'{
$debarch='amd64'
}
else {
$debarch='i386'
}
exec { "apt-update":
command => "/usr/bin/apt-get update"
}
Exec["apt-update"] -> Package <| |>
package {
"linux-headers-${::kernelrelease}":
ensure => latest;

View File

@ -16,7 +16,6 @@
# under the License.
class devcloud (
$cs_dir = $devcloud::params::cs_dir ,
@ -38,9 +37,10 @@ class devcloud (
) inherits devcloud::params {
Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] }
Exec["apt-update"] -> Package <| |>
service {
'ebtables':
ensure => 'running',
@ -67,6 +67,9 @@ class devcloud (
exec {
'apt-update':
command => '/usr/bin/apt-get update';
'get_md5sums':
command => "/usr/bin/wget -N ${md5sum_remote} -O ${md5sum_local}",
require => File["${storage_dir}/secondary/template/tmpl/1/"],