Updating Agent configuration file
Overview
Each Agent runs with a sync.conf
configuration file which keeps settings for connection to Management Console and some other custom settings.
Sometimes admin needs to update it or add a new line there. It can be done manually, or in cases of massive update - via a Distribution or Script job. Create the job to deliver the scripts, add wanted agents there, configure the post download script and launch the job.
In the examples below, we'll update bootstrap_token
in Windows example, and
add a new parameter use_gui: true
so as to enable Agent UI in OS X example.
These two examples can be extrapolated to other agents and combined in one
job. Of course, each script must preserve its syntax for specific operating
system.
Update Agent configuration file
Here's the script itself that actually updates the config: update-syncconf.ps1
To edit default parameters in config, use the following arguments:
NewBootstrap , NewHost , NewFingerprint , NewStoragePath , followed
by their new value. When editing folder storage path, simply type
C:\new\folder as value, use brackets if there are spaces in path.
To add a new parameter use -CustomParameterName
Agent is able to discover sync.conf in default installation directory and update it.
Here's the script: update-syncconf.py
It requires path to config defined through --config
You'll need to add 'executable' attribute to the script.