Hi André,

Currently, *autoregister.properties *does not have a capability to change
the agent name. Agent name will be picked up based on the hostname of the
machine where the agent is running.

I have verified that providing
*agent.auto.register.environments=env1,env2 *works
fine and I can see that agent is associated with the specified envs on
Agents page.


Bhupendrakumar Piprava
Sr.Consultant
Email [email protected]
Telephone +91 7276373725 <+91+7276373725>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=bhupendrakumar-piprava-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>

On Thu, Aug 16, 2018 at 7:04 PM, André Neves <[email protected]>
wrote:

> Hi,
>
> Should it be possible to use "autoregister.properties" so that whoever
> needs this agent and is attempting to add it to the server, specifies for
> example the name of the agent and the environment(s) to be added but not
> the key itself? The end result that I would wish to have is a new agent
> added in the environment, already added to the needed GoCD environment and
> with a specific name but not enabled by default which means, still pending
> approval. This would allow avoiding the need of the GoCD Admin to approve
> and do the assignment to GoCD environment manually and also allow for
> people to specify the go-agent name in case there is agent cloning on the
> host machine meaning that we could avoid both having the same name.
>
> Current documentation is under https://docs.gocd.org/current/
> advanced_usage/agent_auto_register.html .
>
> I've tried this already and it didn't work which means, the agent got
> added to the server, I can see it, but the name I've specific is not set
> and the environment I've set is also not related to the agent. After
> starting up the server the file is modified so we can see that go tried to
> read it.
>
> # This property has been removed by Go after attempting to auto-register
> with the Go server.
> # agent.auto.register.hostname=agent1
> # This property has been removed by Go after attempting to auto-register
> with the Go server.
> # agent.auto.register.environments=LAB
>
>
> Thank you
>
> André
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to