ansible - delete unmanaged files from directory?

前端 未结 7 1936
情深已故
情深已故 2021-01-30 06:38

I want to recursively copy over a directory and render all .j2 files in there as templates. For this I am currently using the following lines:

7条回答
  •  有刺的猬
    2021-01-30 07:19

    There might be a couple of ways to handle this, but would it be possible to entirely empty the target directory in a task before the template step? Or maybe drop the templated files into a temporary directory and then delete+rename in a subsequent step?

提交回复
热议问题