2017-06-14 27 views

回答

1

与以下配置构建一个实例:

#cloud-config 
write_files: 
    - path: /root/test.sh 
    content: | 
     #!/bin/bash 
     set -x 
     set -e 
     whoami 
runcmd: 
    - bash /root/test.sh 

我得到的输出:

+ whoami 
root 

Ubuntu的云配置运行作为