DS
Size: a a a
DS
A
A
class apt_base::install {
exec { 'apt-update':
command => '/usr/bin/apt-get update'
}
$base_packages = ['curl','wget']
package { $base_packages:
ensure => present,
require => Exec['apt-update']
}
}node 'node01' {
include apt_base::install
}A
A
A
A
unless ни refreshonly ни других опцийA
class apt_base::install {
exec { 'apt-update':
command => '/usr/bin/apt-get update',
refreshonly => true
}
$base_packages = ['curl','wget']
package { $base_packages:
ensure => present,
require => Exec['apt-update']
}
}A
A
A
VL
A
A
class apt_base::install {
$base_packages = ['curl','wget']
Class['apt::update'] -> $base_packages <| provider == 'apt' |>
}A
node 'node01' {
include apt_base::install
}DS
exec {'base_apt_update':
command => 'apt-get update',
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
onlyif => '[ "`find /var/lib/apt/lists -maxdepth 0 -type d -mmin +60`" = "/var/lib/apt/lists" ]'
}DS
DS