Based on code review change exec from apt update to apt_update.
exec { "apt-builddep-${name}":
command => "/usr/bin/apt-get -y --force-yes build-dep ${name}",
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
}
}
if $always_apt_update == true {
- Exec <| title=='apt update' |> {
+ Exec <| title=='apt_update' |> {
refreshonly => false,
}
}
group => root,
mode => '0644',
content => $sources_list_content,
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
file { 'sources.list.d':
group => root,
purge => $purge_sources_list_d,
recurse => $purge_sources_list_d,
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
case $disable_keys {
file { 'configure-apt-proxy':
path => "${apt_conf_d}/proxy",
content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
}
}
exec { "add-apt-repository-${name}":
command => "/usr/bin/add-apt-repository ${name}",
creates => "${sources_list_d}/${sources_list_d_filename}",
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
file { "${sources_list_d}/${sources_list_d_filename}":
group => root,
mode => '0644',
content => template("${module_name}/source.list.erb"),
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
if ($pin != false) and ($ensure == 'present') {
class apt::update {
include apt::params
- exec { 'apt update':
+ exec { 'apt_update':
command => "${apt::params::provider} update",
refreshonly => true,
}
'group' => "root",
'purge' => true,
'recurse' => true,
- 'notify' => 'Exec[apt update]'
+ 'notify' => 'Exec[apt_update]'
})
else
should create_file("sources.list.d").with({
'group' => "root",
'purge' => false,
'recurse' => false,
- 'notify' => 'Exec[apt update]'
+ 'notify' => 'Exec[apt_update]'
})
end
}
it {
- should contain_exec("apt update").with({
+ should contain_exec("apt_update").with({
'command' => "/usr/bin/apt-get update",
'refreshonly' => refresh_only_apt_update
})
should contain_file('configure-apt-proxy').with(
'path' => '/etc/apt/apt.conf.d/proxy',
'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";",
- 'notify' => "Exec[apt update]"
+ 'notify' => "Exec[apt_update]"
)
else
should_not contain_file('configure_apt_proxy')
describe "should succeed with a Class['apt']" do
let(:pre_condition) { 'class {"apt": } ' }
- it { should contain_exec("apt update").with({
+ it { should contain_exec("apt_update").with({
'command' => "/usr/bin/apt-get update",
'refreshonly' => true
})
t.sub(/^ppa:/,'').gsub('/','-') << "-" << "#{release}.list"
end
- it { should contain_exec("apt update").with(
+ it { should contain_exec("apt_update").with(
'command' => '/usr/bin/apt-get update',
'refreshonly' => true
)
it { should contain_exec("add-apt-repository-#{t}").with(
'command' => "/usr/bin/add-apt-repository #{t}",
- 'notify' => "Exec[apt update]",
+ 'notify' => "Exec[apt_update]",
'creates' => "/etc/apt/sources.list.d/#{filename}"
)
}
}
it {
- should contain_exec("apt update").with({
+ should contain_exec("apt_update").with({
"command" => "/usr/bin/apt-get update",
"refreshonly" => true
})