[RANCHER 1.6] Add label via host rancher-agent startup?

Hi,

I’m stuck on this one, and needing some help.

I’m using terraform/ansible to provision the entire infrastucture, and it basically works. The process is:

  1. Create all hosts on digitalocean
  2. Copy the docker-compose files across for rancher server and other standalone containers
  3. Start up rancher
  4. Get the command for the host to register itself with Rancher
  5. Set up the stacks.

At this point, I’d like to be able to point certain stacks to certain hosts using the host labels.

However, I can’t find a way for the host to register itself with labels.

Anyone know how to do this?

Any help is appreciated,

Regards,
Andy

-e CATTLE_HOST_LABELS='query-string-encoded-key=value-pairs'

Ah, fantastic. Thanks so much!