如何使用Ansible附加文件 [英] How to append the file using Ansible

查看:89
本文介绍了如何使用Ansible附加文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试将文件追加到现有文件中.当我点击特定的网址时,每次都会获取更新的数据. 我的要求是将更新后的文件附加到同一文件,而不是每次都创建一个新文件.我正在使用get_url模块来获取文件.但文件未更新.如果我将目的地作为新文件提供,则数据将被复制到新文件中.

I'm trying to append a file to the existing file. When I hit a specific url I get the updated data everytime. my requirement is to append the updated to the same file instead of creating a new file everytime. I'm using get_url module to get the file. but the file is not being updated. If I give the destination as new file then data is being copied to new file.

推荐答案

get_url似乎不支持该操作.您可能需要检索文件并使用组装模块进行串联(或合并)文件.

get_url doesn't appear to support that operation. You may need to retrieve the file and use the Assemble module to concatenate (or combine) the files.

这篇关于如何使用Ansible附加文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆