we have a number of deployment targets set up in octopus. we’re changing the hostname and domain name for many of them, and i’d like to know whether there’s a way to get the tentacle to update its target name in octopus, rather than having to go through the “infrastructure” page and manually update their names.
is there an option or tool to get octopus to recognize and update these targets’ new hostnames and and domain suffixes? we have like 150+ servers, so doing it manually would be really time-consuming.
Instead of pulling down one specific machine with the where-object modifier, bring them all down and iterate through them.
In a forloop for each machine, instead of adding a role, you would need to implement logic to modify the name of the machine to add the hyphen (if that is the only change you’re making) to the name and put the machine back in place with a POST call.
Please read the script and test thoroughly before putting it into a production environment, as the scripts we have in our repository are not guaranteed to work in all scenarios.
Please let me know if that works for you or if we need to try something different.