1
启动AWS或其他云供应商实例并使用cloud-init配置主机时,哪些用户使用bash脚本来运行?cloud-config运行的用户是什么?
启动AWS或其他云供应商实例并使用cloud-init配置主机时,哪些用户使用bash脚本来运行?cloud-config运行的用户是什么?
与以下配置构建一个实例:
#cloud-config
write_files:
- path: /root/test.sh
content: |
#!/bin/bash
set -x
set -e
whoami
runcmd:
- bash /root/test.sh
我得到的输出:
+ whoami
root
Ubuntu的云配置运行作为根。