`apt update`コマンドの実行回数を減らす
This commit is contained in:
parent
48d0e3be76
commit
bc2f8128ff
|
@ -15,6 +15,8 @@ template '/etc/apt/sources.list.d/hashicorp.list' do
|
|||
variables(distribution: DIST)
|
||||
end
|
||||
|
||||
execute 'apt update'
|
||||
execute 'apt update' do
|
||||
not_if 'which consul'
|
||||
end
|
||||
|
||||
package 'consul'
|
||||
|
|
|
@ -10,7 +10,9 @@ execute 'curl https://packages.grafana.com/gpg.key | apt-key add -' do
|
|||
not_if 'apt-key list | grep grafana'
|
||||
end
|
||||
|
||||
execute 'apt update'
|
||||
execute 'apt update' do
|
||||
not_if 'which grafana-server'
|
||||
end
|
||||
|
||||
package 'grafana' do
|
||||
action :install
|
||||
|
|
|
@ -15,6 +15,8 @@ template '/etc/apt/sources.list.d/hashicorp.list' do
|
|||
variables(distribution: DIST)
|
||||
end
|
||||
|
||||
execute 'apt update'
|
||||
execute 'apt update' do
|
||||
not_if 'which nomad'
|
||||
end
|
||||
|
||||
package 'nomad'
|
||||
|
|
|
@ -15,6 +15,8 @@ template '/etc/apt/sources.list.d/hashicorp.list' do
|
|||
variables(distribution: DIST)
|
||||
end
|
||||
|
||||
execute 'apt update'
|
||||
execute 'apt update' do
|
||||
not_if 'which vault'
|
||||
end
|
||||
|
||||
package 'vault'
|
||||
|
|
|
@ -17,6 +17,8 @@ template '/etc/apt/sources.list.d/timber-vector.list' do
|
|||
variables(distribution: DIST)
|
||||
end
|
||||
|
||||
execute 'apt update'
|
||||
execute 'apt update' do
|
||||
not_if 'which vector'
|
||||
end
|
||||
|
||||
package 'vector'
|
||||
|
|
Loading…
Reference in New Issue