Switch to host naming
Servers concept will encompass custom cmd and labels. Host is just the IP address.
This commit is contained in:
@@ -7,12 +7,12 @@ namespace :mrsk do
|
||||
namespace :prune do
|
||||
desc "Prune unused images older than 30 days"
|
||||
task :images do
|
||||
on(MRSK_CONFIG.servers) { execute "docker image prune -f --filter 'until=720h'" }
|
||||
on(MRSK_CONFIG.hosts) { execute "docker image prune -f --filter 'until=720h'" }
|
||||
end
|
||||
|
||||
desc "Prune stopped containers for the service older than 3 days"
|
||||
task :containers do
|
||||
on(MRSK_CONFIG.servers) { execute "docker container prune -f --filter label=service=#{MRSK_CONFIG.service} --filter 'until=72h'" }
|
||||
on(MRSK_CONFIG.hosts) { execute "docker container prune -f --filter label=service=#{MRSK_CONFIG.service} --filter 'until=72h'" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user