0
  • I have a task in my playbook which should copy some files to a target directoy
  • The files should have an 'i' flag upon completion, so I set the attributes parameter of the copy like attributes: +i
  • this works for none existing files existing ones (which already have the 'i' attribute set before running the task) fail to be updated

can anyone advise me on how to solve this? I would think logically the module should check the existing files and (if the attribute exists) switch it off, and turn it back on after execution of copy. I would have any idea how to achieve this practically. Or is there any way to brute force my way through this?

vrms
  • 287
  • 1
  • 7
  • 17

1 Answers1

1

Or is there any way to brute force my way through this?

well, writing that sentence made me check the manual for copy once again more thouroughly ... and it seems adding force: yes to the copy task, does exactly that.

vrms
  • 287
  • 1
  • 7
  • 17