(#11966) Change apt update to apt_update.
Based on code review change exec from apt update to apt_update.
This commit is contained in:
parent
82967a22fa
commit
f13f3cfac7
9 changed files with 16 additions and 16 deletions
|
@ -7,6 +7,6 @@ define apt::builddep() {
|
|||
|
||||
exec { "apt-builddep-${name}":
|
||||
command => "/usr/bin/apt-get -y --force-yes build-dep ${name}",
|
||||
notify => Exec['apt update'],
|
||||
notify => Exec['apt_update'],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class apt(
|
|||
}
|
||||
|
||||
if $always_apt_update == true {
|
||||
Exec <| title=='apt update' |> {
|
||||
Exec <| title=='apt_update' |> {
|
||||
refreshonly => false,
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class apt(
|
|||
group => root,
|
||||
mode => '0644',
|
||||
content => $sources_list_content,
|
||||
notify => Exec['apt update'],
|
||||
notify => Exec['apt_update'],
|
||||
}
|
||||
|
||||
file { 'sources.list.d':
|
||||
|
@ -70,7 +70,7 @@ class apt(
|
|||
group => root,
|
||||
purge => $purge_sources_list_d,
|
||||
recurse => $purge_sources_list_d,
|
||||
notify => Exec['apt update'],
|
||||
notify => Exec['apt_update'],
|
||||
}
|
||||
|
||||
case $disable_keys {
|
||||
|
@ -95,7 +95,7 @@ class apt(
|
|||
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'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ define apt::ppa(
|
|||
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}":
|
||||
|
|
|
@ -32,7 +32,7 @@ define apt::source(
|
|||
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') {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class apt::update {
|
||||
include apt::params
|
||||
|
||||
exec { 'apt update':
|
||||
exec { 'apt_update':
|
||||
command => "${apt::params::provider} update",
|
||||
refreshonly => true,
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ describe 'apt', :type => :class do
|
|||
'group' => "root",
|
||||
'purge' => true,
|
||||
'recurse' => true,
|
||||
'notify' => 'Exec[apt update]'
|
||||
'notify' => 'Exec[apt_update]'
|
||||
})
|
||||
else
|
||||
should create_file("sources.list.d").with({
|
||||
|
@ -83,13 +83,13 @@ describe 'apt', :type => :class do
|
|||
'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
|
||||
})
|
||||
|
@ -119,7 +119,7 @@ describe 'apt', :type => :class do
|
|||
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')
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'apt::builddep', :type => :define do
|
|||
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
|
||||
})
|
||||
|
|
|
@ -18,7 +18,7 @@ describe 'apt::ppa', :type => :define do
|
|||
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
|
||||
)
|
||||
|
@ -26,7 +26,7 @@ describe 'apt::ppa', :type => :define do
|
|||
|
||||
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}"
|
||||
)
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ describe 'apt::source', :type => :define do
|
|||
}
|
||||
|
||||
it {
|
||||
should contain_exec("apt update").with({
|
||||
should contain_exec("apt_update").with({
|
||||
"command" => "/usr/bin/apt-get update",
|
||||
"refreshonly" => true
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue