[英]CloudFormation Windows Instances Bootstrapping
I understand that we need leverage user-data
to inject any script or code. 我了解我们需要利用
user-data
来注入任何脚本或代码。 There are few aspects of automation like - changing the host-name
or joining to a domain controller
which would involve restarting of the instance. 自动化的方面很少,例如-
changing the host-name
或joining to a domain controller
,这将涉及重新启动实例。
Say if I want to do both ie change the host-name
- the instance would perform restart and for the subsequent steps of domain-join
would be ignored. 假设我要同时执行两个操作,即更改
host-name
-实例将执行重新启动,并且随后的domain-join
步骤将被忽略。
Is there a way / work around to get this through ? 有办法解决这个问题吗?
You could just run all necesary commands and run 'Restart-Computer'. 您可以只运行所有必需的命令并运行“ Restart-Computer”。 Userdata runs only on the initial start of the instance lifecycle so you're fine to do this.
Userdata仅在实例生命周期的初始开始时运行,因此您可以这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.