Rather than deploying a service to an existing machine, it is possible to deploy to a service to an existing service.
For example if you add the following newservice in your bundle which will deploy to the same machine as existingservice/0.
newservice:
charm: "cs:xenial/ubuntu"
num_units: 1
to:
- lxd:existingservice/0
So in order to address particular machines, you can deploy a service to each machine using the ubuntu charm. Then you can address the machine using that service.
Noting a workaround that may help some people.
Rather than deploying a service to an existing machine, it is possible to deploy to a service to an existing service.
For example if you add the following newservice in your bundle which will deploy to the same machine as existingservice/0.
newservice: vice/0
charm: "cs:xenial/ubuntu"
num_units: 1
to:
- lxd:existingser
So in order to address particular machines, you can deploy a service to each machine using the ubuntu charm. Then you can address the machine using that service.