2017-06-14 28 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的雲配置運行作爲