大佬教程收集整理的这篇文章主要介绍了linux – 使用cloud-init用户数据,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
以下是我的cloud-init用户数据
#cloud-config runcmd: - [ ls,-l,/ ] - [ sh,-xc,"echo $(datE) ': Hello World!'" ] - [ sh,-c,echo "=========Hello world'=========" ] - [ touch,/home/ec2-user/Hello.txt ] final_message: "The sy@L_696_7@ is finally up,after 10 seconds"
我的期望是看到/var/log/cloud-init.log上的数据.但我不认为那里.此外,我没有看到任何错误,也没有看到创建的Hello.txt文件
有什么东西我错过了吗?
我正在运行亚马逊linux实例而不是ubuntu实例
- [ sh,echo "=========Hello world'=========" ]
#cloud-config runcmd: - [ ls,'echo $(datE) ": Hello World!"' ] - [ sh,'echo "=========Hello world========="' ] - [ touch,/home/ec2-user/Hello.txt ] final_message: "The sy@L_696_7@ is finally up" output : { all : '| tee -a /var/log/cloud-init-output.log' }
请注意,它仅在/var/log/cloud-init.log中显示cloud-init执行日志.在指定输出指令后,您应该在/var/log/cloud-init-output.log中看到输出.
以上是大佬教程为你收集整理的linux – 使用cloud-init用户数据全部内容,希望文章能够帮你解决linux – 使用cloud-init用户数据所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。