In looking around vCO, at least in the default plug-in, there was not a good variety of workflows for configuring hosts. This workflow, will set the NTP server on a host.
Not a very creative schema, and for good reason. Also note, it is designed to work on a single host at a time. If you want to do all hosts, you can include this workflow inside a larger one to process a number of hosts:
This workflow has only a single input of type Vc:HostSystem and a single attribute, a string, for the NTP server.
// ——- UpdateDateTimeConfig ——-
var config = new VcHostDateTimeConfig();
config.timeZone = “UTC”;
config.ntpConfig = new VcHostNtpConfig();
var ntpServerArray = new Array()
config.ntpConfig.server = ntpServerArray;
config.ntpConfig.server = ntpServer;
// ——- Update Config ——-
var dts = VMHost.configManager.dateTimeSystem;
// ——- EnableRuleset ——-
var ruleset = VMHost.configManager.firewallSystem;
// ——- UpdateServicePolicy ——-
var serviceSystem = VMHost.configManager.serviceSystem;
serviceSystem.updateServicePolicy(“ntpd”, “automatic”); // HostServiceSystem
// ——- StartService ——-
serviceSystem.startService(“ntpd”); // HostServiceSystem
There aren’t many exciting ways to show a workflow in action and using screenshots always feels like those cooking shows “baked at 450 for 3 hours” or so. But, here it goes:
This workflow can be pulled down from here. If you have any questions, comments, enhancements, etc. Drop me a line.
One thought on “[Orchestrator] Configure Host Time Settings”
Comments are closed.