Update a docker service:
docker::services {'redis_update':
create => false,
update => true,
service_name => 'redis',
replicas => '3',
}
Remove a docker service:
-
To remove a service, add the following code to the manifest file:
docker::services {'redis':
create => false,
ensure => 'absent',
service_name => 'redis',
}
-
To remove the service from a swarm, include the ensure => absent parameter and the service_name parameter.