追加 cloud-init write_files
Append with cloud-init write_files
将write_files
与cloud-init一起使用时,是否可以追加内容?如果是,怎么做?
write_files: [
{
"path": "/home/user/some-file",
"content": "\nLine to append!"
}
]
不可能,但我添加了功能并提出了 a merge request,随后获得批准。
该功能从 18.5 开始可用。
每 https://cloudinit.readthedocs.io/en/latest/topics/modules.html#write-files
write_files:
- path: /home/user/some-file
content: |
Line to append!
append: true
将write_files
与cloud-init一起使用时,是否可以追加内容?如果是,怎么做?
write_files: [
{
"path": "/home/user/some-file",
"content": "\nLine to append!"
}
]
不可能,但我添加了功能并提出了 a merge request,随后获得批准。
该功能从 18.5 开始可用。
每 https://cloudinit.readthedocs.io/en/latest/topics/modules.html#write-files
write_files:
- path: /home/user/some-file
content: |
Line to append!
append: true